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