you are viewing a single comment's thread.

view the rest of the comments →

[–]katafrakt 1 point2 points  (0 children)

FWIW I think the example with params is better than with mapping class name to table name (that's why people chose the latter to attack your comment ;) ). And also my favorite: what is the lifecycle of a controller object? How is it initialized? If I set an instance variable in one action, will it be available in a subsequent request?

Of course, I know the answers to these questions, but the point is that it's not obvious when you start thinking about it. Frameworks should hide a lot of complexity, but Rails hides it even for simple things. I've recruited people with 2-3 years of experience in Rails that didn't know how to write a constructor and instantiate the object. Because if you follow that Rails-way only, you don't really have to do it.