Skip to content

Commit 834bc11

Browse files
committed
use "do end" instead of {} at ApplicationController
git-svn-id: http://svn.redmine.org/redmine/trunk@20142 e93f8b46-1217-0410-a6f0-8f06a7374b81
1 parent d55582d commit 834bc11

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

app/controllers/application_controller.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -259,23 +259,23 @@ def require_login
259259
url = url_for(:controller => params[:controller], :action => params[:action], :id => params[:id], :project_id => params[:project_id])
260260
end
261261
respond_to do |format|
262-
format.html {
262+
format.html do
263263
if request.xhr?
264264
head :unauthorized
265265
else
266266
redirect_to signin_path(:back_url => url)
267267
end
268-
}
269-
format.any(:atom, :pdf, :csv) {
268+
end
269+
format.any(:atom, :pdf, :csv) do
270270
redirect_to signin_path(:back_url => url)
271-
}
272-
format.api {
271+
end
272+
format.api do
273273
if Setting.rest_api_enabled? && accept_api_auth?
274274
head(:unauthorized, 'WWW-Authenticate' => 'Basic realm="Redmine API"')
275275
else
276276
head(:forbidden)
277277
end
278-
}
278+
end
279279
format.js { head :unauthorized, 'WWW-Authenticate' => 'Basic realm="Redmine API"' }
280280
format.any { head :unauthorized }
281281
end
@@ -562,9 +562,9 @@ def render_error(arg)
562562
@status = arg[:status] || 500
563563

564564
respond_to do |format|
565-
format.html {
565+
format.html do
566566
render :template => 'common/error', :layout => use_layout, :status => @status
567-
}
567+
end
568568
format.any { head @status }
569569
end
570570
end
@@ -675,13 +675,13 @@ def parse_qvalues(value)
675675
tmp = []
676676
if value
677677
parts = value.split(/,\s*/)
678-
parts.each {|part|
678+
parts.each do |part|
679679
if m = %r{^([^\s,]+?)(?:;\s*q=(\d+(?:\.\d+)?))?$}.match(part)
680680
val = m[1]
681681
q = (m[2] or 1).to_f
682682
tmp.push([val, q])
683683
end
684-
}
684+
end
685685
tmp = tmp.sort_by{|val, q| -q}
686686
tmp.collect!{|val, q| val}
687687
end

0 commit comments

Comments
 (0)