Module: Refinery::Pages::InstanceMethods
- Defined in:
- pages/lib/refinery/pages/instance_methods.rb
Class Method Summary (collapse)
Instance Method Summary (collapse)
- - (Object) error_404(exception = nil)
-
- (Object) refinery_menu_pages
Compiles the default menu.
Class Method Details
+ (Object) included(base)
5 6 7 8 |
# File 'pages/lib/refinery/pages/instance_methods.rb', line 5 def self.included(base) base.send :helper_method, :refinery_menu_pages base.send :alias_method_chain, :render, :presenters end |
Instance Method Details
- (Object) error_404(exception = nil)
10 11 12 13 14 15 16 17 18 |
# File 'pages/lib/refinery/pages/instance_methods.rb', line 10 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 return false else super end end |
- (Object) refinery_menu_pages
Compiles the default menu.
21 22 23 |
# File 'pages/lib/refinery/pages/instance_methods.rb', line 21 def ::Refinery::Menu.new(::Refinery::Page.) end |