Commit 0672a0a5 authored by o's avatar o

fix paths in resources

parent 5fe6c534
Pipeline #4830 passed with stages
in 17 minutes and 24 seconds
......@@ -49,7 +49,7 @@ class ResourcesController < ApplicationController
update_account_properties
flash[:success] = :resource_created
end
redirect_to resources_path
redirect_to action: :show, kind: @resource_name
rescue ApiError => e
flash[:danger] = e.api_msg
redirect_to new_resource_path
......@@ -64,10 +64,10 @@ class ResourcesController < ApplicationController
flash[:success] = :success
end
redirect_to resources_path
redirect_to action: :show, kind: params[:kind]
rescue ApiError => e
flash[:danger] = e.api_msg
redirect_to resources_path
redirect_to action: :show, kind: params[:kind]
end
end
......@@ -66,7 +66,7 @@ Rails.application.routes.draw do
get '/msg', to: 'application#msg'
get '/resources/:kind', to: 'resources#show'
post '/resources', to: 'resources#update'
post '/resources/:kind', to: 'resources#update'
get '/new_resource', to: 'resources#create'
post '/new_resource', to: 'resources#do_create'
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment