Commit a47fc7fa74f84449f93d3c943aca0c1ee930f6d5
Committed by
Rafael Manzo
1 parent
4a9a516f
Exists in
colab
and in
4 other branches
edit action was added in mezuro_configuration_controller
Showing
1 changed file
with
11 additions
and
7 deletions
Show diff stats
app/controllers/mezuro_configurations_controller.rb
... | ... | @@ -13,13 +13,17 @@ class MezuroConfigurationsController < ApplicationController |
13 | 13 | end |
14 | 14 | |
15 | 15 | def create |
16 | - @configuration = KalibroGem::Entities::Configuration.new(configuration_params) | |
17 | - if @configuration.save | |
18 | - redirect_to mezuro_configuration_path(@configuration.id), | |
19 | - notice: 'Configuração criada com sucesso!' | |
20 | - else | |
21 | - render action: :new | |
22 | - end | |
16 | + @configuration = KalibroGem::Entities::Configuration.new(configuration_params) | |
17 | + if @configuration.save | |
18 | + redirect_to mezuro_configuration_path(@configuration.id), | |
19 | + notice: 'Configuração criada com sucesso!' | |
20 | + else | |
21 | + render action: :new | |
22 | + end | |
23 | + end | |
24 | + | |
25 | + def edit | |
26 | + @configuration = KalibroGem::Entities::Configuration.find(params[:id]) | |
23 | 27 | end |
24 | 28 | |
25 | 29 | private | ... | ... |