[Rails] Save and delete buttons: POST vs. proximity dilemma
by Michael Schuerig other posts by this author
Aug 29 2005 3:34AM messages near this date
Re: [Rails] Re: migrating just production database
|
Re: [Rails] Save and delete buttons: POST vs. proximity dilemma
I'm in a dilemma: In order to keep GET requests from deleting objects,
I'd like to use the button_to helper to get "something" that generates
a POST request. Unfortunately, that something is a form and forms can't
be nested.
I'd also like to place buttons related to the same form close to each
other. At the top are some navigational buttons (links), then comes the
delete button somewhere in the middle, at the bottom is the save
button. Achieving this without having all of these buttons in the same
form doesn't appear to be possible.
Has anyone managed to solve this?
The best idea I have right now is to use submit buttons in the same
single form, but differentiate them by name. Then, in a before_filter,
I could redirect the delete to the actual delete action. I can't say
that this feels good.
Michael
--
Michael Schuerig Those people who smile a lot
mailto:michael@[...].de Watch the eyes
http://www.schuerig.de/michael/ --Ani DiFranco, Outta Me, Onto You
_______________________________________________
Rails mailing list
Rails@[...].org
http://lists.rubyonrails.org/mailman/listinfo/rails
Thread:
Michael Schuerig
Justin Forder
Tom Reinhart
Markus
Michael Schuerig
rails
Steve Downey
Michael Schuerig
Jarkko Laine
|