Class: Iron::BlockDefinitionsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Iron::BlockDefinitionsController
- Defined in:
- app/controllers/iron/block_definitions_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'app/controllers/iron/block_definitions_controller.rb', line 20 def create @block_definition = BlockDefinition.new(block_definition_params) if @block_definition.save redirect_to @block_definition, notice: "Block definition was successfully created." else render :new, status: :unprocessable_entity end end |
#destroy ⇒ Object
38 39 40 41 |
# File 'app/controllers/iron/block_definitions_controller.rb', line 38 def destroy @block_definition.destroy! redirect_to block_definitions_path, notice: "Block definition was successfully destroyed.", status: :see_other end |
#edit ⇒ Object
17 18 |
# File 'app/controllers/iron/block_definitions_controller.rb', line 17 def edit end |
#index ⇒ Object
6 7 8 |
# File 'app/controllers/iron/block_definitions_controller.rb', line 6 def index @block_definitions = BlockDefinition.all end |
#new ⇒ Object
13 14 15 |
# File 'app/controllers/iron/block_definitions_controller.rb', line 13 def new @block_definition = BlockDefinition.new end |
#show ⇒ Object
10 11 |
# File 'app/controllers/iron/block_definitions_controller.rb', line 10 def show end |
#update ⇒ Object
30 31 32 33 34 35 36 |
# File 'app/controllers/iron/block_definitions_controller.rb', line 30 def update if @block_definition.update(block_definition_params) redirect_to @block_definition, notice: "Block definition was successfully updated.", status: :see_other else render :edit, status: :unprocessable_entity end end |