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

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

Instance Method Summary collapse

Instance Method Details

#column_namesObject



48
49
50
# File 'lib/mongo_mapper/plugins/rails.rb', line 48

def column_names
  keys.keys
end

#has_many(*args) ⇒ Object



44
45
46
# File 'lib/mongo_mapper/plugins/rails.rb', line 44

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

#has_one(*args) ⇒ Object



40
41
42
# File 'lib/mongo_mapper/plugins/rails.rb', line 40

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

#human_nameObject



52
53
54
# File 'lib/mongo_mapper/plugins/rails.rb', line 52

def human_name
  self.name.demodulize.titleize
end