Kristian Hellquist wrote:
> I personally use ResourceController,
> http://github.com/jamesgolick/resource_controller,  for controllers
> using the REST-pattern, but
> http://github.com/josevalim/inherited_resources seems very nice too.

Yes.  I use make_resourceful, which is similar.  Note, however, that 
neither this or Alpha Blue's suggestion really addresses the question of 
making controllers skinny.

The OP's controller is beyond fat into morbidly obese. :)  To fix, read 
some good stuff about refactoring.  The short version:

0. If you haven't already got tests and Cucumber features, write them 
now so you can make sure you're not breaking anything.  And then get 
into the habit of writing tests first. :)
1. Find a coherent block of code.
2. Extract that into a separate method.
3. Move that method into the model.
4. Lather, rinse, repeat.
> 
> /K
> 

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to