lsam26-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Sep-07 21:22 UTC
form_remote_tag :confirm tag
<% form_remote_tag( :url => { :action => ''add_items'', :id => @vtl.id}, :html => {:id => ''add_items_form''}, :confirm => "Are you sure stuff" ) do %> That is the generic form_remote_tag that i have used so far. But, in one case, I have to conditional pop up the confirm dialog. If a, use this form and pop-up the dialog and if b, use this form without the dialog. How can I do that without using a if-else statement? I do not want to duplicate the same code one with the :confirm case and the other without. Any ideas? --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---