Just starting a new thread so that it's easy to follow. I just submitted a patch at trac to add a new class method called "set_default_values" ( not a great name I think ), which lets you do all kinds of crazy stuff with setting default values.
This ticket is at http://dev.rubyonrails.org/ticket/9093 and example pastie is at http://pastie.caboo.se/81925 It also lets you make use of other attributes ( set by supplying attributes to Model.new call or even those set by set_default_values call ) in setter method/proc. If people like this approach, I'll add tests to patch, else will just close the ticket :) -- Cheers! - Pratik http://m.onkey.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" 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-core?hl=en -~----------~----~----~----~------~----~------~--~---
