On Jul 21, 12:02 am, "David A. Black" <[email protected]> wrote: > You can do this and get, by coincidence, something like the desired > effect: > > def x=(val) > super > # do other stuff > end > > because the call to super will trigger AR::B#method_missing, but the > more I look at it and play around with it, the more I think it's way > too fragile and too closely couple to the method_missing > implementation to use.
I haven't actually tried this but it looks like activerecord won't generate an accessor if the method already exists (see define_attribute_methods in activerecord/lib/active_record/ attribute_methods.rb Fred > > David > > -- > David A. Black / Ruby Power and Light, LLC > Ruby/Rails consulting & training:http://www.rubypal.com > Now available: The Well-Grounded Rubyist (http://manning.com/black2) > Training! Intro to Ruby, with Black & Kastner, September 14-17 > (More info:http://rubyurl.com/vmzN) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

