Class: Pulitzer::LayoutsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Pulitzer::LayoutsController
- Defined in:
- app/controllers/pulitzer/layouts_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
10 11 12 13 |
# File 'app/controllers/pulitzer/layouts_controller.rb', line 10 def create @layout = Pulitzer::Layout.create(layout_params) render partial: 'show_wrapper', locals: {layout: @layout} end |
#destroy ⇒ Object
28 29 30 31 |
# File 'app/controllers/pulitzer/layouts_controller.rb', line 28 def destroy @layout.destroy head :ok and return end |
#edit ⇒ Object
19 20 21 |
# File 'app/controllers/pulitzer/layouts_controller.rb', line 19 def edit render partial: 'form', locals: {layout: @layout} end |
#new ⇒ Object
4 5 6 7 8 |
# File 'app/controllers/pulitzer/layouts_controller.rb', line 4 def new @layout = Pulitzer::Layout.new(layout_params) @post_type = @layout.post_type render partial: 'new', locals: {layout: @layout} end |
#show ⇒ Object
15 16 17 |
# File 'app/controllers/pulitzer/layouts_controller.rb', line 15 def show render partial: 'show', locals: {layout: @layout} end |
#update ⇒ Object
23 24 25 26 |
# File 'app/controllers/pulitzer/layouts_controller.rb', line 23 def update @layout.update_attributes(layout_params) render partial: 'show', locals: {layout: @layout} end |