Skip to content

Commit 5677a2e

Browse files
author
root
committed
Add comment, coding style
1 parent 5698d98 commit 5677a2e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Diff for: lib/redmine_git_hosting/patches/users_controller_patch.rb

+3-4
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ def edit_with_git_hosting(&block)
3232

3333

3434
def update_with_git_hosting(&block)
35-
# Set public key values for view
35+
# Set public key values for view (in case of invalid form)
3636
set_public_key_values
3737

3838
# Previous routine
3939
update_without_git_hosting(&block)
4040

4141
# Update projects if needed
42-
update_projects
42+
update_projects if @user.status_has_changed?
4343
end
4444

4545

@@ -66,8 +66,7 @@ def set_public_key_values
6666

6767

6868
def update_projects
69-
options = { message: "Status of '#{@user.login}' has changed, update projects" }
70-
GitoliteAccessor.update_projects(projects_to_update, options) if @user.status_has_changed?
69+
GitoliteAccessor.update_projects(projects_to_update, { message: "Status of '#{@user.login}' has changed, update projects" })
7170
end
7271

7372

0 commit comments

Comments
 (0)