I guess you want to diferenciate clicks to different submit buttons. I 
did it like this:

<%= image_submit_tag('add_16.png', :name => "action_categories/new") %>

By specifiing name you can differenciate in controller which button was 
selected.

params.each do |e|
  if e[0][0,7] == 'action_'
    ctrl, action = e[0][7,100].split('/')
    action ||= 'index'
    break
  end
end

The example shows which controller/action call when submit button is 
pressed.


by
TheR

-- 
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