Returns the value of the attribute identified by attr_name after
it has been typecast (for example, “2004-12-12” in a data column
is cast to a date object, like Date.new(2004, 12, 12)). (Alias
for the protected read_attribute method). # File
activerecord/lib/active_record/base.rb, line 1523 def
(attr_name) read_attribute(attr_name) end THAiSi, and any others
wondering this as well: I’ve done some pretty extensive digging
in to the rails code, for a couple of projects, and I’ve found
that there are several methods that don’t appear in APIDock.
There are several reasons for this, but I’m not sure
read_attribute falls under any of them. Perhaps it has something
to do with read_attribute being defined and/or redefined in the
foundation for rails (they actually do some stuff to mask out a
ton of default behavior of ruby for these classes, and add their
own level of inheritance functionality. Things like
cattr_accessor - which is like attr_accessor, but for a class,
rather than an object… class Object < ActiveRecor