Search code examples
ruby-on-railsscaffoldingcontrollers

Rails Application Controller for critique (feel free to be harsh)


I've written an application controller that handles 99% of what I need any controller to do. I've posted it here (pastebin). Like I said, feel free to be harsh.

-update: added comments :)

Thx,

-C

P.S. I would like to say that my intention here is to overwrite methods that need different functionality in sub-classed controllers, such as the _message methods and the after_ methods. The application controller will serve as a sort of abstract class. also, some of the before_filters are specific to plugins, such as tiny_mce and restful_authentication (which is awesome, imho.)


Solution

  • This is not an answer to your question, but if you want to go further in this direction, you may want to take a look at Hobo. Its Hobo::ModelController does a lot of what your ApplicationController does.