route submit button to custom path

Viewed 3567

I am trying to route a submit button to a specific path (page), but I believe my syntax is not accurate.

This is what I have now:

<%= submit_tag('Next (Step 2 of 3)'), customer_index_path %>

I am getting the error:

/Users/anmareewilliams/RailsApps/GroupOrderingCopy/app/views/products/index.html.erb:18: syntax error, unexpected ',', expecting ')'
...bmit_tag('Next (Step 2 of 3)'), customer_index_path );@outpu...
...  

I tried this as well:

<%= submit_tag'Next (Step 2 of 3)', customer_index_path %> 

and got no errors in the text editor, but got a Rails error that said:

undefined method `stringify_keys' for "/customer/index":String

How can I accomplish routing my submit to a specific path?

2 Answers
Related