Fully embrace Ruby 1.9 hash syntax

Didn't bother with files in db/, config/, or features/
This commit is contained in:
Robert Speicher 2012-08-10 18:07:50 -04:00
parent 1413c23c50
commit 7754189187
257 changed files with 1449 additions and 1449 deletions

View file

@ -11,15 +11,15 @@ class ApplicationController < ActionController::Base
helper_method :abilities, :can?
rescue_from Gitlab::Gitolite::AccessDenied do |exception|
render "errors/gitolite", :layout => "error"
render "errors/gitolite", layout: "error"
end
rescue_from Encoding::CompatibilityError do |exception|
render "errors/encoding", :layout => "error", :status => 404
render "errors/encoding", layout: "error", status: 404
end
rescue_from ActiveRecord::RecordNotFound do |exception|
render "errors/not_found", :layout => "error", :status => 404
render "errors/not_found", layout: "error", status: 404
end
layout :layout_by_resource
@ -97,15 +97,15 @@ class ApplicationController < ActionController::Base
end
def access_denied!
render "errors/access_denied", :layout => "error", :status => 404
render "errors/access_denied", layout: "error", status: 404
end
def not_found!
render "errors/not_found", :layout => "error", :status => 404
render "errors/not_found", layout: "error", status: 404
end
def git_not_found!
render "errors/git_not_found", :layout => "error", :status => 404
render "errors/git_not_found", layout: "error", status: 404
end
def method_missing(method_sym, *arguments, &block)
@ -127,7 +127,7 @@ class ApplicationController < ActionController::Base
end
def render_404
render :file => File.join(Rails.root, "public", "404"), :layout => false, :status => "404"
render file: File.join(Rails.root, "public", "404"), layout: false, status: "404"
end
def require_non_empty_project