0

Is there a way to have the equivalent of

<%= link_to "Continue", "/profile" %>

but with a button_to? From what I understand you have to use a rails route. like new_user_path or something.

I was thinking something like this

<%= button_to "Continue", "/profile", method: :get %>

let me know if it's possible, and if not then some maybe my best alternative... Thanks

ruevaughn
  • 1,319
  • 1
  • 17
  • 48

1 Answers1

0

As I understand you can use just a string. So <%= button_to "Continue", "/profile", { :method => :get } %> provides

<form action="/profile" class="button_to" method="get">
  <div>
    <input type="submit" value="Continue" />
  </div>
</form>

Is it what you want?

Danil Speransky
  • 29,891
  • 5
  • 68
  • 79