Class: Admin::BlockLayoutsController
- Inherits:
-
ForestController
- Object
- ForestController
- Admin::BlockLayoutsController
- Defined in:
- app/controllers/admin/block_layouts_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'app/controllers/admin/block_layouts_controller.rb', line 17 def create @block_layout = BlockLayout.new(block_layout_params) @block_layout if @block_layout.save redirect_to edit_admin_block_layout_path(@block_layout), notice: 'BlockLayout was successfully created.' else render :new end end |
#edit ⇒ Object
13 14 15 |
# File 'app/controllers/admin/block_layouts_controller.rb', line 13 def edit @block_layout end |
#index ⇒ Object
4 5 6 |
# File 'app/controllers/admin/block_layouts_controller.rb', line 4 def index @block_layouts = apply_scopes(BlockLayout).by_id.page params[:page] end |
#new ⇒ Object
8 9 10 11 |
# File 'app/controllers/admin/block_layouts_controller.rb', line 8 def new @block_layout = BlockLayout.new @block_layout end |
#update ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'app/controllers/admin/block_layouts_controller.rb', line 28 def update @block_layout if @block_layout.update(block_layout_params) redirect_to edit_admin_block_layout_path(@block_layout), notice: 'BlockLayout was successfully updated.' else render :edit end end |