Class: Admin::Atreides::PagesController
- Inherits:
-
Atreides::AdminController
- Object
- Atreides::AdminController
- Admin::Atreides::PagesController
- Includes:
- Atreides::Extendable
- Defined in:
- app/controllers/admin/atreides/pages_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
23 24 25 26 27 28 29 |
# File 'app/controllers/admin/atreides/pages_controller.rb', line 23 def create resource. = current_user resource.last_editor = current_user super do |success, failure| success.html { redirect_to admin_pages_path } end end |
#index ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'app/controllers/admin/atreides/pages_controller.rb', line 3 def index @list_cols = %w(page state) @action_cols = %w(add_child) super do |wants| wants.html wants.js end end |
#new ⇒ Object
18 19 20 21 |
# File 'app/controllers/admin/atreides/pages_controller.rb', line 18 def new resource.parent_id = params[:parent_id].to_i if params[:parent_id] super end |
#show ⇒ Object
12 13 14 15 16 |
# File 'app/controllers/admin/atreides/pages_controller.rb', line 12 def show super do |wants| wants.html { redirect_to admin_pages_path } end end |
#update ⇒ Object
31 32 33 34 35 36 |
# File 'app/controllers/admin/atreides/pages_controller.rb', line 31 def update resource.last_editor = current_user super do |success, failure| success.html { redirect_to admin_pages_path } end end |