ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ruby-rails
ruby-rails
[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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved