Class: ActiveCanvas::PagesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ActiveCanvas::PagesController
- Defined in:
- app/controllers/active_canvas/pages_controller.rb
Instance Method Summary collapse
Instance Method Details
#home ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'app/controllers/active_canvas/pages_controller.rb', line 3 def home @page = Setting.homepage if @page render :show else render :no_homepage end end |
#show ⇒ Object
13 14 15 16 |
# File 'app/controllers/active_canvas/pages_controller.rb', line 13 def show @page = Page.published.find_by(slug: params[:slug]) raise ActionController::RoutingError, "Not Found" unless @page end |