Tuesday, March 28, 2006 at 6:31PM
Note to self: calling your shiny new model 'action' in Rails, no matter how well it maps to the problem domain, isn't really that great an idea. The word might even sound familiar, eh? You're only really going to notice the problem when it comes to form submission though (or possibly other interaction with the controller).
Reader Comments (2)
Wouldn't it be sweet if rails would include a reserved word list? Even sweeter if it used that word list when running script/generate so that you couldn't name things great names that match your problem domain but can't be used?
Weird, I came across exactly the same problem last week, was fine until I went to call params[:action], took at least an hour to figure out what was wrong. Should have twigged sooner realy. I agree with Forrest, some kind of safeguard for this would be good.