Forum: Ruby on Rails Get variables from button_to

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
henrik.ormasen (Guest)
on 2005-12-05 14:43
(Received via mailing list)
Very newbie..
Excuse for this very stupid simple question, but I just cant find the
answer anywhere:

When I use the botton_to method, how do I pick up the string it posts
in the controller?

ie:

view:
   <%= button_to @fakbasevar, {
		   :action => 'del_item',
		   :id => @fakebasevar
				       }

I thought of something like:
item = Item.new(params[:_])

in the del_item method in the controller...

How can I get the content of @fakebasevar inn the item var?

Regards Henrik
This topic is locked and can not be replied to.