title: Price input in Rails4
body: <p>I recently switched to Rails4 and i'm. not. getting. things. to. work...</p>
  
  <p><strong><code>ANSWER: As Aman remembered me, in Rails 4 we have to filter attributes in the Controller.</code></strong></p>
  
  <p>I want to add Pricing to my Listings Scaffold.</p>
  
  <p>1.) Generate a Migration</p>
  
  <pre><code>rails g migration AddPriceToListings price:decimal
  </code></pre>
  
  <p>2.) Edit the migration:</p>
  
  <pre><code>add_column :listings, :price, :decimal, :precision =&gt; 8, :scale =&gt; 2
  </code></pre>
  
  <p>3.) Add Input to my Form</p>
  
  <pre><code>&lt;!-- Price Field --&gt;
  &lt;div class="control-group"&gt;
    &lt;label class="control-label"&gt;Price&lt;/label&gt;
    &lt;div class="controls"&gt;
      &lt;%= f.input :price, :placeholder =&gt; "0.00", label: false %&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>4.) On the Showpage</p>
  
  <pre><code>&lt;%= number_to_currency(@listing.price, :unit =&gt; "$") %&gt;
  </code></pre>
  
  <p>But on my Shopage there is nothing. The prices doesn't get displayed. It don't even show up in the Database.</p>
  
  <p>Any suggestions ?</p>