fix conflicts

This commit is contained in:
Stella Rouzi 2014-08-12 15:48:29 +03:00
parent e2fb434dc7
commit 71dfb3b7e4
34 changed files with 160 additions and 211 deletions

View file

@ -20,28 +20,16 @@ module Admin
end
def update
params[:user].delete :roles_attributes if params[:user]
@user.update_attributes!(params[:user])
redirect_to admin_users_path, notice: "Updated #{@user.email}"
end
def add_role
role = params[:user][:roles_attributes][:"0"]
@user.add_role role['name'].parameterize.underscore.to_sym, Conference.find(role['resource_id'])
respond_to do |format|
format.html
format.js
end
end
def edit
end
def destroy
@user.destroy
redirect_to admin_users_path, notice: "User #{@user.name} (#{@user.email})got deleted"
redirect_to admin_users_path, notice: "User got deleted"
end
end
end