search for: read_attribute_before_type_cast

Displaying 2 results from an estimated 2 matches for "read_attribute_before_type_cast".

2006 May 10
13
Issue in ActiveRecord generated reader methods
Hi all! I have come into a strange issue in Rails that I am hoping someone can shed some light. To make a very long story short, I have been researching how to override ActiveRecord::Base#read_attribute and write_attribute to perform security checks at the model level (influenced by the ModelSecurity generator). Shortly after implementing some code to check this behavior, I began to
2005 Mar 06
0
ActiveRecord: casting and saving
...become Numeric between a call to ActiveRecord::Base#update_attributes and when the database is hit by ConnectionAdapters::ConcreteAdapter#update ? >From what I can see, @record.update_attributes(@params[''record'']) sets fields to string values (which you can get using Base#read_attribute_before_type_cast), and I can''t see read_attribute (which performs a cast) being used on the way to the database. Can someone explain this? Cheers, Dave