Skip to content

Allow 404 page to have custom view/layout templates. #1746

Merged
merged 1 commit into from Jun 12, 2012
View
2 pages/lib/refinery/pages/instance_methods.rb
@@ -10,7 +10,7 @@ def self.included(base)
def error_404(exception=nil)
if (@page = ::Refinery::Page.where(:menu_match => "^/404$").includes(:parts).first).present?
# render the application's custom 404 page with layout and meta.
- render :template => '/refinery/pages/show', :formats => [:html], :status => 404
+ render_with_templates?(:status => 404)
return false
else
super
Something went wrong with that request. Please try again.