X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6c2432ae423c6744b8443c63d0e02e1ccc2d3011..22946d703a1186d0ec7fb18a663f73855bb49546:/app/controllers/oauth_clients_controller.rb diff --git a/app/controllers/oauth_clients_controller.rb b/app/controllers/oauth_clients_controller.rb index b925002ec..c17d3856d 100644 --- a/app/controllers/oauth_clients_controller.rb +++ b/app/controllers/oauth_clients_controller.rb @@ -11,20 +11,6 @@ class OauthClientsController < ApplicationController @tokens = current_user.oauth_tokens.authorized end - def new - @client_application = ClientApplication.new - end - - def create - @client_application = current_user.client_applications.build(application_params) - if @client_application.save - flash[:notice] = t "oauth_clients.create.flash" - redirect_to :action => "show", :id => @client_application.id - else - render :action => "new" - end - end - def show @client_application = current_user.client_applications.find(params[:id]) rescue ActiveRecord::RecordNotFound @@ -32,6 +18,10 @@ class OauthClientsController < ApplicationController render :action => "not_found", :status => :not_found end + def new + @client_application = ClientApplication.new + end + def edit @client_application = current_user.client_applications.find(params[:id]) rescue ActiveRecord::RecordNotFound @@ -39,6 +29,16 @@ class OauthClientsController < ApplicationController render :action => "not_found", :status => :not_found end + def create + @client_application = current_user.client_applications.build(application_params) + if @client_application.save + flash[:notice] = t "oauth_clients.create.flash" + redirect_to :action => "show", :id => @client_application.id + else + render :action => "new" + end + end + def update @client_application = current_user.client_applications.find(params[:id]) if @client_application.update(application_params)