Sha256: d0e5f5ec6ea9d1a94d8a7f728f008254fc8d9563f54e19ebf99fe0ac92e20670
Contents?: true
Size: 821 Bytes
Versions: 41
Compression:
Stored size: 821 Bytes
Contents
module MongoMapper module Plugins module Rails module InstanceMethods def to_param id.to_s end def new_record? new? end def read_attribute(name) self[name] end def read_attribute_before_typecast(name) read_key_before_typecast(name) end def write_attribute(name, value) self[name] = value end end module ClassMethods def has_one(*args) one(*args) end def has_many(*args) many(*args) end def column_names keys.keys end def human_name self.name.demodulize.titleize end end end end end
Version data entries
41 entries across 41 versions & 4 rubygems