Module: Mongo::Model::Rails::ClassMethods
- Defined in:
- lib/mongo/model/integration/rails.rb
Instance Method Summary collapse
Instance Method Details
#model_name ⇒ Object
26 27 28 29 30 31 |
# File 'lib/mongo/model/integration/rails.rb', line 26 def model_name @_model_name ||= begin namespace = self.ancestors.detect { |n| n.respond_to?(:_railtie) } ActiveModel::Name.new(self, namespace) end end |