[Rails] Rails 4 - undefined method build in using strong parameters

2013-09-17 Thread Erwin
In my backoffice/users_controller.rb , I wrote a class to build the permitted parameters class Backoffice::UsersController ApplicationController class UserParams def build params params.require(:user).permit(:email, :password, :password_confirmation ) end

Re: [Rails] Rails 4 - undefined method build in using strong parameters

2013-09-17 Thread Colin Law
On 17 September 2013 18:27, Erwin yves_duf...@mac.com wrote: In my backoffice/users_controller.rb , I wrote a class to build the permitted parameters class Backoffice::UsersController ApplicationController class UserParams def build params If you want a class method (rather

Re: [Rails] Rails 4 - undefined method build in using strong parameters

2013-09-17 Thread Erwin
Thanks Colin... changed to : private def user_params params.require(:user).permit(:email, :password, :password_confirmation ) end and cretae /update... def create @user = User.new(user_params) Le mardi 17 septembre 2013 19:31:43 UTC+2, Colin Law a écrit : On 17