Qwaiter in the green 💚

This commit is contained in:
2013-12-22 15:20:14 +01:00
parent 76c2d4ddbc
commit 69132b0c07
20 changed files with 150 additions and 935 deletions
+8 -2
View File
@@ -53,7 +53,7 @@ module Admin
# POST /users
# POST /users.json
def create
@user = User.new(params[:user])
@user = User.new(user_params)
respond_to do |format|
if @user.save
@@ -72,7 +72,7 @@ module Admin
@user = User.find(params[:id])
respond_to do |format|
if @user.update_attributes(params[:user])
if @user.update_attributes(user_params)
format.html { redirect_to [:admin, @user], notice: t('action.update.successfull', model: User.model_name.human) }
format.json { head :no_content }
else
@@ -93,5 +93,11 @@ module Admin
format.json { head :no_content }
end
end
private
def user_params
params.require(:user).permit!
end
end
end