Module: Refinery::Pages::InstanceMethods

Defined in:
lib/refinery/pages/instance_methods.rb

Instance Method Summary collapse

Instance Method Details

#error_404(exception = nil) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/refinery/pages/instance_methods.rb', line 5

def error_404(exception=nil)
  if (@page = ::Page.where(:menu_match => '^/404$').includes(:parts, :slugs).first).present?
    # render the application's custom 404 page with layout and meta.
    render :template => '/pages/show',
           :format => 'html',
           :status => 404
  else
    super
  end
end