Module: MongoMapper::Plugins::Rails::InstanceMethods
- Defined in:
- lib/novelys_mongo_mapper/plugins/rails.rb
Instance Method Summary collapse
- #new_record? ⇒ Boolean
- #read_attribute(name) ⇒ Object
- #read_attribute_before_typecast(name) ⇒ Object
- #to_param ⇒ Object
- #write_attribute(name, value) ⇒ Object
Instance Method Details
#new_record? ⇒ Boolean
9 10 11 |
# File 'lib/novelys_mongo_mapper/plugins/rails.rb', line 9 def new_record? new? end |
#read_attribute(name) ⇒ Object
13 14 15 |
# File 'lib/novelys_mongo_mapper/plugins/rails.rb', line 13 def read_attribute(name) self[name] end |
#read_attribute_before_typecast(name) ⇒ Object
17 18 19 |
# File 'lib/novelys_mongo_mapper/plugins/rails.rb', line 17 def read_attribute_before_typecast(name) read_key_before_typecast(name) end |
#to_param ⇒ Object
5 6 7 |
# File 'lib/novelys_mongo_mapper/plugins/rails.rb', line 5 def to_param id.to_s end |
#write_attribute(name, value) ⇒ Object
21 22 23 |
# File 'lib/novelys_mongo_mapper/plugins/rails.rb', line 21 def write_attribute(name, value) self[name] = value end |