Module: MongoMapper::Plugins::Rails::ClassMethods

Defined in:
lib/novelys_mongo_mapper/plugins/rails.rb

Instance Method Summary collapse

Instance Method Details

#column_namesObject



35
36
37
# File 'lib/novelys_mongo_mapper/plugins/rails.rb', line 35

def column_names
  keys.keys
end

#has_many(*args) ⇒ Object



31
32
33
# File 'lib/novelys_mongo_mapper/plugins/rails.rb', line 31

def has_many(*args)
  many(*args)
end

#has_one(*args) ⇒ Object



27
28
29
# File 'lib/novelys_mongo_mapper/plugins/rails.rb', line 27

def has_one(*args)
  one(*args)
end

#human_nameObject



39
40
41
# File 'lib/novelys_mongo_mapper/plugins/rails.rb', line 39

def human_name
  self.name.demodulize.titleize
end