I have a case where I am abstracting the creation of models. After a fair bit of indirection, I eventually get around to making a .new call.
I need to be able to pass params to that .new call. I know I can't use def initialize() in an AR model (rather frustrating). So, I have found some references to after_initialize, but that doesn't work either. I see several threads on people trying to use after_initialize, but no conclusive answers to the same errors I am seeing -- undefined method `stringify_keys! Example refc: http://www.ruby-forum.com/topic/86173 My after_initialize is just this simple code: def after_initialize(asset_path) @asset_path = asset_path end So either a) what is the proper technique for using after_initialize, or b) is there another way I can pass params to an AR model in a .new call ? Thx. -- greg willits -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

