Module: Icss::ReceiverModel::ActiveModelShim

Included in:
Meta::RecordField
Defined in:
lib/icss/receiver_model/active_model_shim.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



28
29
30
31
32
33
# File 'lib/icss/receiver_model/active_model_shim.rb', line 28

def self.included(base)
  base.class_eval do
    extend  ActiveModel::Naming
    include ActiveModel::Validations
  end
end

Instance Method Details

#destroyed?Boolean

Returns:



22
# File 'lib/icss/receiver_model/active_model_shim.rb', line 22

def destroyed?()  false end

#errorsObject



24
25
26
# File 'lib/icss/receiver_model/active_model_shim.rb', line 24

def errors
  @_errors ||= ActiveModel::Errors.new(self)
end

#new_record?Boolean

Returns:



20
# File 'lib/icss/receiver_model/active_model_shim.rb', line 20

def new_record?() true  end

#to_modelObject



16
17
18
# File 'lib/icss/receiver_model/active_model_shim.rb', line 16

def to_model
  self
end