X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/15b104f4ff4614aa78c01180b6a9b89dd5a1400f..fb953006a1a8fe2949f376e167dda963dfd784bd:/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