But I only have one form, and I need every button to do a different
action. Can you please help me find something to make it work?
Greetings
The N.
The first one is clearly a submit button, but the other two could be
link_to_function, button_to_function, link_to_remote, or
button_to_remote. Those wouldn’t be ‘in’ the form. (Actually, the
Delete the User could be a
link_to(‘Delete’, user_path(@user), :method => :delete,
:confirm => “Really delete #{@user.name}?\n(There is no
undo!)”)
or similar.)
You can get the name of the submit input activated, too, if you need
to make a choice about what happens next. (I.e., “Complete Order” or
“Change Shipping Address”)
I forgot to tell you it has to use elements of the form. The delete
user could be separated from the form, but the Prawn (PDF) button
functionality must have all the values of the form when something is
modified. It has to be in the form is there a button_to-like function
inside the form?
Greetings…
The N.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.