Skip to content

Commit 95f5214

Browse files
author
root
committed
Coding style
1 parent 386035e commit 95f5214

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Diff for: app/helpers/extend_repositories_helper.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def enable_git_annex_field(form, repository)
2929

3030

3131
def repository_branches_list(branches)
32-
options_for_select(branches.collect{ |b| [b.to_s, b.to_s] }, selected: branches.find{ |b| b.is_default}.to_s)
32+
options_for_select branches.collect { |b| [b.to_s, b.to_s] }, selected: branches.find { |b| b.is_default }.to_s
3333
end
3434

3535

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

+1-3
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,7 @@ def find_project_repository_with_git_hosting
130130
@rev_to = params[:rev_to]
131131

132132
unless @rev.to_s.match(REV_PARAM_RE) && @rev_to.to_s.match(REV_PARAM_RE)
133-
if @repository.branches.blank?
134-
raise InvalidRevisionParam
135-
end
133+
raise InvalidRevisionParam if @repository.branches.empty?
136134
end
137135
rescue ActiveRecord::RecordNotFound
138136
render_404

0 commit comments

Comments
 (0)