read_attribute_before_type_cast(attr_name)
Instance Public methods
Returns the value of the attribute identified by attr_name
before typecasting and deserialization.
class Task < ActiveRecord::Base end task = Task.new(id: '1', completed_on: '2012-10-21') task.read_attribute('id') # => 1 task.read_attribute_before_type_cast('id') # => '1' task.read_attribute('completed_on') # => Sun, 21 Oct 2012 task.read_attribute_before_type_cast('completed_on') # => "2012-10-21" task.read_attribute_before_type_cast(:completed_on) # => "2012-10-21"
Please login to continue.