class ActiveRecord::Reflection::MacroReflection
def klass
a new association object. Use +build_association+ or +create_association+
Note: Do not call +klass.new+ or +klass.create+ to instantiate
# => Client
Company.reflect_on_association(:clients).klass
end
has_many :clients
class Company < ActiveRecord::Base
has_many :clients returns the Client class
composed_of :balance, class_name: 'Money' returns the Money class
Returns the class for the macro.
def klass @klass ||= _klass(class_name) end