Module: MmAdapter::InstanceMethods
- Defined in:
- lib/models/mm_adapter.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
60
61
62
63
|
# File 'lib/models/mm_adapter.rb', line 60
def method_missing(meth, *args, &block)
@instance.send(meth, *args, &block)
end
|
Instance Method Details
#errors ⇒ Object
56
57
58
|
# File 'lib/models/mm_adapter.rb', line 56
def errors
@instance.errors.full_messages.join(', ')
end
|
#saved ⇒ Object
52
53
54
|
# File 'lib/models/mm_adapter.rb', line 52
def saved
@instance.valid?
end
|
#update(attributes) ⇒ Object
47
48
49
50
|
# File 'lib/models/mm_adapter.rb', line 47
def update(attributes)
@instance.update_attributes attributes
@instance.save
end
|
#valid ⇒ Object
43
44
45
|
# File 'lib/models/mm_adapter.rb', line 43
def valid
@instance.valid?
end
|