title: Rails: How to style form submit button
body: <p>I have a Rails 4, that uses Rails' default form (I am NOT using Simple Form).</p>
  
  <p>In one of my forms, I would like to style the following submit button:</p>
  
  <pre><code>&lt;td&gt;
    &lt;%= f.submit %&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>I tried to apply an <code>id</code> to the <code>td</code> but this obviously applied my new style to the entire table cell.</p>
  
  <p>Then, I tried to apply an <code>id</code> to the submit button itself, <a href="https://stackoverflow.com/questions/5315967/add-a-css-class-to-f-submit">as recommended here</a>, as follows:</p>
  
  <pre><code>&lt;td&gt;
    &lt;%= f.submit, :id =&gt; 'create_post' %&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>This gave me the following error:</p>
  
  <pre><code>SyntaxError in CalendarsController#show
  /Users/TXC/code/rails/calendy/app/views/calendars/show.html.erb:69: syntax error, unexpected =&gt;, expecting :: or '[' or '.' ...er.append=( f.submit, :class =&gt; 'create_post' );@output_buff... ... ^
  &lt;%= f.submit, :class =&gt; 'create_post' %&gt;
  </code></pre>
  
  <p>What is a good way to apply a custom style to a submit button in Rails?</p>