Module: ActiveRecord::AttributeMethods::Read
- Defined in:
- lib/composite_primary_keys/attribute_methods/read.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#read_attribute(attr_name) ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/composite_primary_keys/attribute_methods/read.rb', line 28 def read_attribute(attr_name) # CPK if attr_name.kind_of?(Array) attr_name.map {|name| read_attribute(name)}.to_composite_keys else self.class.type_cast_attribute(attr_name, @attributes, @attributes_cache) end end |