instance method
klass
Ruby on Rails 3.1.12
Since v2.2.3Signature
klass()
Returns the class for the macro.
composed_of :balance, :class_name => 'Money' returns the Money class has_many :clients returns the Client class
Source
# File activerecord/lib/active_record/reflection.rb, line 119
def klass
@klass ||= class_name.constantize
end
Defined in activerecord/lib/active_record/reflection.rb line 119
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Reflection::MacroReflection