3 Replies Latest reply on Jan 10, 2013 2:45 PM by Shane Ye

    Passing parameters to controller vs creating new actions

      Here is what I want to do.


      I have a list of products and I want a button for deleting all of them. Now what it is better?:


      Creating a new action on the controller called "delete_all" or modify the actual action "delete" to accept a parameter :all = true. If I take the last option I would like somebody post a snippet please. Because this parameter should be optional and by default "all" should be false. I know the way of how to do it in Rails 3.2 but I'm not sure if this would work in Rho.


      Many Thanks