Skip to content

Commit

Permalink
redirect to advance instead of raising error
Browse files Browse the repository at this point in the history
  • Loading branch information
skylarmb committed Apr 6, 2017
1 parent 9d27e33 commit 07447e0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions app/controllers/comfy/cms/content_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,15 @@ def load_cms_page
end

def page_not_found
@cms_page = @cms_site.pages.published.find_by_full_path!('/404')
# @cms_page = @cms_site.pages.published.find_by_full_path!('/404')

respond_to do |format|
format.html { render_page(404) }
end
rescue ActiveRecord::RecordNotFound
raise ActionController::RoutingError.new("Page Not Found at: \"#{params[:cms_path]}\"")
# respond_to do |format|
# format.html { render_page(404) }
# end
# rescue ActiveRecord::RecordNotFound
# raise ActionController::RoutingError.new("Page Not Found at: \"#{params[:cms_path]}\"")

redirect_to '/advance'
end

end

0 comments on commit 07447e0

Please sign in to comment.