Module: DataMapper::Model
- Defined in:
- lib/dm-adjust/model.rb
Instance Method Summary collapse
- #adjust(attributes = {}, reload = false) ⇒ Object
-
#adjust!(attributes, reload = false) ⇒ Object
increment or decrement attributes on all objects in a resource.
Instance Method Details
#adjust(attributes = {}, reload = false) ⇒ Object
4 5 6 |
# File 'lib/dm-adjust/model.rb', line 4 def adjust(attributes = {}, reload = false) raise NotImplementedError, 'adjust *with* validations has not be written yet, try adjust!' end |
#adjust!(attributes, reload = false) ⇒ Object
increment or decrement attributes on all objects in a resource
17 18 19 |
# File 'lib/dm-adjust/model.rb', line 17 def adjust!(attributes,reload=false) all.adjust!(attributes,reload) end |