Class: PagesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- PagesController
- Defined in:
- app/controllers/pages_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
3 4 5 6 |
# File 'app/controllers/pages_controller.rb', line 3 def index # Find the first published root page @pages = Page.published.shown_in_sitemap.all.group_by(&:parent_id) end |
#show ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/pages_controller.rb', line 8 def show if @page respond_to do |format| format.html # show.html.erb format.xml { render :xml => @page } end else raise ActiveRecord::RecordNotFound end end |