 <p>Try it, </p> <pre><code>&lt;div class="field"&gt; &lt;%= p.label :first_name %&gt;&lt;br&gt; &lt;%= p.text_field(:first_name , :class =&gt; "parent_first_name") %&gt; &lt;/div&gt;` </code></pre> <p>just added the Parentheses </p>