search for: render_optional_error_file

Displaying 2 results from an estimated 2 matches for "render_optional_error_file".

2011 Mar 16
1
Help overriding rescue_action_in_public in Rails 3
In Rails 2.3.x, you can override render_optional_error_file like so: # ApplicationController.rb protected def render_optional_error_file(status_code) render :template => "errors/500", :status => 500, :layout => ''application'' end However, Rails 3 no longer has render_optional_error_file. Instead, you need to overr...
2009 Feb 04
2
rendering error page for "Unauthorized" from before_filter
Hey all, I am writing a plugin in which I want to stop the rendering of an action with an unauthorized response if the user is not authorized to view the resource. I am using a before filter to achieve this and inside that before filter I do it like so: render :text => "Unauthorized!", :status => :unauthorized, :layout => false The status is properly set since I see the