Module: AWS::Record::Naming

Defined in:
lib/aws/record/naming.rb

Instance Method Summary collapse

Instance Method Details

#model_nameObject

This method should only ever get called in a Rails 3+ context where active model and active support have been loaded. Rails 2 does not call model name on object.



24
25
26
27
# File 'lib/aws/record/naming.rb', line 24

def model_name
  @_model_name ||=
    ActiveModel::Name.new(self.kind_of?(Class) ? self : self.class)
end