X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/cb87f02642d0097ebc067ca1f9371dde274a41e3..988d7cd90df00a8eabbc3cc40e1f3467a0b2dec0:/app/controllers/oauth_clients_controller.rb diff --git a/app/controllers/oauth_clients_controller.rb b/app/controllers/oauth_clients_controller.rb index 76fdd6421..b925002ec 100644 --- a/app/controllers/oauth_clients_controller.rb +++ b/app/controllers/oauth_clients_controller.rb @@ -3,7 +3,8 @@ class OauthClientsController < ApplicationController before_action :authorize_web before_action :set_locale - before_action :require_user + + authorize_resource :class => ClientApplication def index @client_applications = current_user.client_applications @@ -40,7 +41,7 @@ class OauthClientsController < ApplicationController def update @client_application = current_user.client_applications.find(params[:id]) - if @client_application.update_attributes(application_params) + if @client_application.update(application_params) flash[:notice] = t "oauth_clients.update.flash" redirect_to :action => "show", :id => @client_application.id else