Class: Pulitzer::SequenceFlowStylesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Pulitzer::SequenceFlowStylesController
- Defined in:
- app/controllers/pulitzer/sequence_flow_styles_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'app/controllers/pulitzer/sequence_flow_styles_controller.rb', line 9 def create @sequence_flow_style = Pulitzer::SequenceFlowStyle.create(sequence_flow_style_params) if @sequence_flow_style.errors.empty? render partial: 'show_wrapper', locals: {sequence_flow_style: @sequence_flow_style} else render partial: 'new', locals: {sequence_flow_style: @sequence_flow_style}, status: 409 end end |
#destroy ⇒ Object
35 36 37 38 |
# File 'app/controllers/pulitzer/sequence_flow_styles_controller.rb', line 35 def destroy @sequence_flow_style.destroy head :ok and return end |
#edit ⇒ Object
22 23 24 |
# File 'app/controllers/pulitzer/sequence_flow_styles_controller.rb', line 22 def edit render partial: 'form', locals: {sequence_flow_style: @sequence_flow_style} end |
#new ⇒ Object
4 5 6 7 |
# File 'app/controllers/pulitzer/sequence_flow_styles_controller.rb', line 4 def new @sequence_flow_style = Pulitzer::SequenceFlowStyle.new(sequence_flow_style_params) render partial: 'new', locals: {sequence_flow_style: @sequence_flow_style} end |
#show ⇒ Object
18 19 20 |
# File 'app/controllers/pulitzer/sequence_flow_styles_controller.rb', line 18 def show render partial: 'show', locals: {sequence_flow_style: @sequence_flow_style} end |
#update ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'app/controllers/pulitzer/sequence_flow_styles_controller.rb', line 26 def update @sequence_flow_style.update_attributes(sequence_flow_style_params) if @sequence_flow_style.errors.empty? render partial: 'show', locals: {sequence_flow_style: @sequence_flow_style} else render partial: 'form', locals: {sequence_flow_style: @sequence_flow_style}, status: 409 end end |