search for: attribute_access

Displaying 1 result from an estimated 1 matches for "attribute_access".

Did you mean: attribute_accesors
2008 Nov 01
0
Overloading #initialize in a model
I''m using WhinyProtectedAttributes: http://henrik.nyh.se/2007/10/whiny-protected-attributes Say I have this model: class Person < ActiveRecord::Base attribute_accessible :name end If I then create a Person with an invalid attribute, an exception is raised. For example: Person.new :name => ''Bob'', :asdf => ''asdf'' What I''d like to do is, in the Person model, modify the hash of attributes before they''r...