Skip to content

Instantly share code, notes, and snippets.

@kris
Created August 21, 2009 18:44

Revisions

  1. kris revised this gist Aug 21, 2009. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rescue_from_actioncontroller_routingerror.rb
    Original file line number Diff line number Diff line change
    @@ -4,5 +4,5 @@
    def page_not_found
    activate_authlogic
    @possible = Title.find_tagged_with(request.request_uri.split('/'), :on => :tags, :limit => 5)
    render :template => "shared/page_not_found", :layout => "application", :status => :not_found
    render :template => "shared/page_not_found", :status => :not_found
    end
  2. kris created this gist Aug 21, 2009.
    8 changes: 8 additions & 0 deletions rescue_from_actioncontroller_routingerror.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    rescue_from ActionController::RoutingError, :with => :page_not_found

    private
    def page_not_found
    activate_authlogic
    @possible = Title.find_tagged_with(request.request_uri.split('/'), :on => :tags, :limit => 5)
    render :template => "shared/page_not_found", :layout => "application", :status => :not_found
    end