title: Rails 4 - strong parameters concept involvement in spree-2.1
body: <p>How to add new fields for spree::user in Spree-2.1 + Rails4 ?</p>
  
  <p>Like my old customization:
    ==========================</p>
  
  <p>Spree::User.class_eval do</p>
  
  <pre><code>attr_accessible :f_name, :l_name :gender
  validates :f_name, :presence =&gt; true, :length =&gt; {:maximum =&gt; 25}
  validates :l_name, :presence =&gt; true, :length =&gt; {:maximum =&gt; 20}
  </code></pre>
  
  <p>end</p>
  
  <p>new work with strong parameters:
   ================================</p>
  
  <p>module Spree
      UserRegistrationsController.class_eval do</p>
  
  <pre><code>private
   def spree_user_params
     params.require(:spree_user).permit(:f_name, :l_name)
   end
  
  end
  </code></pre>
  
  <p>end</p>
  
  <p>Even though its not working as it got rollback..</p>
  
  <p>Please let me know your comments.</p>