Hi -- On Tue, 16 Dec 2008, John Yerhot wrote:
> > Personally, I try to keeping my applications restful. It may require > me to rethink how I am going to accomplish a task, but I find it > usually forces the most elegant solution in the end. > > That's not so say I haven't added extra actions to my controllers, but > they really shouldn't have too much clutter in them Keep in mind, though, that the resource routing is designed with hooks to let you create extra methods, and they're just as RESTful as the seven canonical methods. REST per se is method-name neutral. Still, I think it's good to be conservative about adding extra actions. Whenever I find myself writing a new-named method in a controller, I try to think whether I'm actually creating/updating/ etc. something. For example, instead of having a borrow_book action in a users controller, I would probably favor a create action in a loans controller, simply because it converges more predictably on the CRUD-related semantics of the resource routing. David -- David A. Black / Ruby Power and Light, LLC Ruby/Rails consulting & training: http://www.rubypal.com Coming in 2009: The Well-Grounded Rubyist (http://manning.com/black2) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

