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
3ae564db
Verified
Commit
3ae564db
authored
Jan 31, 2018
by
Kaspar Vollenweider
👻
Browse files
some tidy for rubocop
parent
4a1f7235
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/controllers/clients_controller.rb
View file @
3ae564db
...
...
@@ -46,11 +46,7 @@ class ClientsController < ApplicationController
@client
.
involved_authority
||=
current_user
if
current_user
.
social_worker?
authorize
@client
if
@client
.
save
if
@client
.
user
.
social_worker?
&&
ClientNotification
.
active
.
any?
redirect_to
@client
,
notice:
ClientNotification
.
active
.
pluck
(
:body
).
to_sentence
else
redirect_to
@client
,
make_notice
end
redirect_to
@client
,
create_success_notice
else
render
:new
end
...
...
@@ -81,6 +77,12 @@ class ClientsController < ApplicationController
private
def
create_success_notice
if
@client
.
user
.
social_worker?
&&
ClientNotification
.
active
.
any?
{
notice:
ClientNotification
.
active
.
pluck
(
:body
).
to_sentence
}
else
make_notice
end
end
def
create_update_redirect_notice
...
...
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