diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 1d94d9a7c..67948a8e1 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -499,19 +499,19 @@ class ApplicationController < ActionController::Base def render_403(options={}) @project = nil - #render_error({:message => :notice_not_authorized, :status => 403}.merge(options)) - render :template => 'common/403' + render_error({:message => :notice_not_authorized, :status => 403}.merge(options),'common/403') + #render :template => 'common/403' return false end def render_404(options={}) - #render_error({:message => :notice_file_not_found, :status => 404}.merge(options)) - render :template => 'common/404' + render_error({:message => :notice_file_not_found, :status => 404}.merge(options),'common/404') + #render :template => 'common/404' return false end # Renders an error response - def render_error(arg) + def render_error(arg,template = 'common/error') arg = {:message => arg} unless arg.is_a?(Hash) @message = arg[:message] @lay = arg[:layout] @@ -521,9 +521,9 @@ class ApplicationController < ActionController::Base respond_to do |format| format.html { if @lay - render :template => 'common/error', :layout => @lay,:status => @status + render :template => template, :layout => @lay,:status => @status else - render :template => 'common/error', :layout => use_layout, :status => @status + render :template => template, :layout => use_layout, :status => @status end }