Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
birger
users
Commits
0672a0a5
Commit
0672a0a5
authored
Dec 07, 2020
by
o@immerda.ch
Browse files
fix paths in resources
parent
5fe6c534
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/controllers/resources_controller.rb
View file @
0672a0a5
...
...
@@ -49,7 +49,7 @@ class ResourcesController < ApplicationController
update_account_properties
flash
[
:success
]
=
:resource_created
end
redirect_to
resource
s_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
config/routes.rb
View file @
0672a0a5
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment