Adam Milligan's blog



Adam MilliganAdam Milligan
#method_missing makes me eat my words
edit Posted by Adam Milligan on Saturday December 27, 2008 at 07:06PM

A while back I wrote about private methods in ActiveRecord objects, and how Rails 2.2 makes them behave as they should. ActiveRecord associations will no longer respond to private methods defined on their targets; however, my colleague Joseph pointed out that they also no longer respond to methods defined via #method_missing on their targets. Which sucks horse poop through a straw, to some extent.

Adam MilliganAdam Milligan
ActiveRecord learns to respect your privates
edit Posted by Adam Milligan on Tuesday December 02, 2008 at 06:27AM

This is somewhat old news, but I don't think it has received the attention it deserves. As of Rails 2.2, ActiveRecord associations and attributes will now behave properly with regard to access control. You can view the Rails tickets, with patches, here and here.