Method: Her::Model::ORM#reload
- Defined in:
- lib/her/model/orm.rb
#reload(options = nil) ⇒ Object
Refetches the resource
This method finds the resource by its primary key (which could be assigned manually) and modifies the object in-place.
154 155 156 157 158 |
# File 'lib/her/model/orm.rb', line 154 def reload( = nil) fresh_object = self.class.find(id) assign_attributes(fresh_object.attributes) self end |