X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/f0feca800d91ac1d23eb63ca17a45d8fd4d41920..eb6b1ae73357d7629b804e086a58e2ad4528b35e:/app/controllers/oauth_clients_controller.rb diff --git a/app/controllers/oauth_clients_controller.rb b/app/controllers/oauth_clients_controller.rb index 32fbbdd62..320dab1b5 100644 --- a/app/controllers/oauth_clients_controller.rb +++ b/app/controllers/oauth_clients_controller.rb @@ -33,6 +33,9 @@ class OauthClientsController < ApplicationController def edit @client_application = @user.client_applications.find(params[:id]) + rescue ActiveRecord::RecordNotFound + @type = "client application" + render :action => "not_found", :status => :not_found end def update @@ -43,6 +46,9 @@ class OauthClientsController < ApplicationController else render :action => "edit" end + rescue ActiveRecord::RecordNotFound + @type = "client application" + render :action => "not_found", :status => :not_found end def destroy @@ -50,6 +56,9 @@ class OauthClientsController < ApplicationController @client_application.destroy flash[:notice] = t'oauth_clients.destroy.flash' redirect_to :action => "index" + rescue ActiveRecord::RecordNotFound + @type = "client application" + render :action => "not_found", :status => :not_found end private def application_params