Reputation: 65183
Ruby on Rails: How do I pass a variable along with f.submit?
Upvotes: 0
Views: 271
Reputation: 33954
The parameters you'rer passing would be the data in the form, yes?
What parameter/data are you trying to receive? If you want to know the name of the user who performed the submit, or the current time, or something similar, there are other ways to do it.
As Salil mentioned, the parameters/form data are accessible in the controller via the "params" array.
Upvotes: 0
Reputation: 47532
no you can't pass along with submit button.
but you get name of button as params[:commit]
in controller
Upvotes: 2