Refactoring Large Controllers

Hi all,

I've got a Ruby on Rails application where I render a lot of RJS stuff
onto a page. Because of this I've kept all the logic inside pretty much
one controller.
This controller is now pretty big with lots of functions. I was
wondering what is the best way to refactor it?

I was thinking about moving some methods into a helper module, but it
seems that helpers are for views only. Can a method even render an RJS
What else can I do?


If you have lots of well-factored private methods in your controller,
they're good candidates to be moved into a model class or some other
class. My buddy, Zach Dennis, put together a nice tutorial for
RailsConf entitled, "Refactoring Your Rails Application." It was
well-received. More info here: