Class: Docs::PagesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Docs::PagesController
- Includes:
- ManageResource
- Defined in:
- app/controllers/docs/pages_controller.rb
Instance Method Summary collapse
Methods included from ManageResource
Instance Method Details
#create ⇒ Object
21 22 23 24 |
# File 'app/controllers/docs/pages_controller.rb', line 21 def create @page = build_resource create! { redirect_to page_category_pages_path(@page.page_category) } end |
#destroy ⇒ Object
30 31 32 |
# File 'app/controllers/docs/pages_controller.rb', line 30 def destroy super { redirect_to page_category_pages_path(@page.page_category) } end |
#edit ⇒ Object
16 17 18 19 |
# File 'app/controllers/docs/pages_controller.rb', line 16 def edit super resource.set_body_with_default_table end |
#index ⇒ Object
7 8 9 |
# File 'app/controllers/docs/pages_controller.rb', line 7 def index @pages = @page_category.pages.order("via ASC, path ASC").sort_by &:weight end |
#new ⇒ Object
11 12 13 14 |
# File 'app/controllers/docs/pages_controller.rb', line 11 def new @page = build_resource @page.set_body_with_default_table end |
#update ⇒ Object
26 27 28 |
# File 'app/controllers/docs/pages_controller.rb', line 26 def update super { redirect_to page_category_pages_path(@page.page_category) } end |