On Jan 5, 2007, at 11:40 AM, Josselin wrote:

> I have an account_controller object ..  when the  user 'submit the  
> form, the 'confirm' method is called, but 2 buttons can confirm
> so I have to check upon the submit value... which I do
> each submit button CANNOT call a different method in my object..

Are you sure about that?  ;)

class AccountController < ApplicationController
   # ...

   def confirm
     send("confirm_for_#{params[:submit_button]}")
   end

   # ...

   private

   def confirm_for_button_one_name
     # ... whatever ...
   end

   def confirm_for_button_two_name
     # ... whatever ...
   end

   # ...
end

Just a thought.  Not that there is anything wrong with your case  
statement though.

James Edward Gray II