Ok, i will consider that. Another question: how should i capsulate the rendering of unauthorized access? I will present the unauthorized error in varoius formats like html, xml and js, so whats the best way to do that?
On 25 Jan., 16:45, Marnen Laibow-Koser <[email protected]> wrote: > 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_resourcesseems 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-Koserhttp://www.marnen.org > [email protected] > -- > Posted viahttp://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.

