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
open-source
aoz-003
Commits
528a1aa9
Verified
Commit
528a1aa9
authored
Jan 31, 2018
by
Kaspar Vollenweider
👻
Browse files
fix some things from review
parent
0002d735
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/controllers/clients_controller.rb
View file @
528a1aa9
...
...
@@ -3,8 +3,8 @@ class ClientsController < ApplicationController
include
NestedAttributes
include
ContactAttributes
before_action
:set_client
,
only:
[
:show
,
:edit
,
:update
,
:destroy
,
:set_resigned
]
before_action
:set_social_worker_collection
before_action
:set_client
,
only:
[
:show
,
:edit
,
:update
,
:set_resigned
]
before_action
:set_social_worker_collection
,
only:
[
:new
,
:edit
]
def
index
authorize
Client
...
...
@@ -67,8 +67,9 @@ class ClientsController < ApplicationController
end
def
set_resigned
if
@client
.
update
(
acceptance:
'resigned'
,
resigned_by:
current_user
)
redirect_to
@client
,
notice:
'Der klient wurde erfolgreich beendet.'
if
@client
.
update
(
acceptance: :resigned
,
resigned_by:
current_user
)
redirect_back
(
fallback_location:
client_path
(
@client
),
notice:
'Klient/in wurde erfolgreich beendet.'
)
else
redirect_back
(
fallback_location:
client_path
(
@client
),
notice:
{
message:
'Beenden fehlgeschlagen.'
,
...
...
app/views/application/_notification.html.slim
View file @
528a1aa9
...
...
@@ -4,7 +4,7 @@
button
.close
aria-label
=
'Close'
data-dismiss
=
'alert'
type
=
'button'
span
aria-hidden
=
'true'
×
=
notice
||
alert
-
els
e
-
els
if
notice
.
is_a?
Hash
.alert.alert-danger.alert-dismissible
role
=
'alert'
button
.close
aria-label
=
'Close'
data-dismiss
=
'alert'
type
=
'button'
X
h4
=
notice
[
'message'
]
...
...
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