app/controllers/curupira/users_controller.rb in curupira-0.1.2 vs app/controllers/curupira/users_controller.rb in curupira-0.1.3
- old
+ new
@@ -37,9 +37,15 @@
else
render :edit
end
end
+ def permission
+ @user = User.find(params[:user_id])
+ @group_user = @user.group_users.find_by(group_id: params[:group_id])
+ @group = @group_user.group
+ end
+
private
def user_params
params.require(:user).permit(:email, :name, :username, :password, group_users_attributes: [:id, :group_id, :_destroy, role_group_users_attributes: [:id, :role_id]])
end