title: ruby on rails button_to or ideally f.button
body: <p>I'm working on a 'Log In' / 'Sign Up ' form, a project I've 'inherited' from someone else. My Rails isn't that advanced but I'm enjoying it, apart from frustrations of getting something tiny to work in about 10 hours.</p>
  
  <p>When people want to log in, after entering their username and password, they click a 'Log in' button, which works fine:</p>
  
  <pre><code>&lt;%= f.button :submit, I18n.t('sign_in.sign_in_button'), :class =&gt; 'btn btn-primary' %&gt;
  </code></pre>
  
  <p>Now, how can I create a Sign Up button that directs the user to the 'Create account' page?</p>
  
  <p>For example, this link works perfectly:</p>
  
  <pre><code>&lt;%= link_to I18n.t('sign_in.sign_up'), new_user_registration_path %&gt;
  </code></pre>
  
  <p><code>new_user_registration_path</code> goes to the 'Create account' page. Is there nowhere I can stick <code>new_user_registration_path</code> within my button code?</p>
  
  <p>I tried this too, put when clicked it just keeps refreshing the current page, rather than going to the 'Create Account' page:</p>
  
  <pre><code>&lt;%= button_to I18n.t('sign_in.sign_up_button'), new_user_registration_path, :class =&gt; 'btn btn-warning' %&gt;
  </code></pre>