Permalink
Browse files

Merge pull request #1746 from resolve/custom_view_and_layout_404

Allow 404 page to have custom view/layout templates.
  • Loading branch information...
2 parents 57e47eb + 7a257f3 commit e14cb83f255e18063e0ec26cc25c103838c19391 @parndt parndt committed Jun 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

0 comments on commit e14cb83

Please sign in to comment.