diff --git a/app/controllers/gestions_controller.rb b/app/controllers/gestions_controller.rb index f2c29954e..43c7e4c08 100644 --- a/app/controllers/gestions_controller.rb +++ b/app/controllers/gestions_controller.rb @@ -28,7 +28,7 @@ def create respond_to do |format| if @gestion.save - format.html { redirect_to @gestion, notice: 'Gestion was successfully created.' } + format.html { redirect_to @gestion, notice: t(".flashes.created") } format.json { render :show, status: :created, location: @gestion } else format.html { render :new } @@ -42,7 +42,7 @@ def create def update respond_to do |format| if @gestion.update(gestion_params) - format.html { redirect_to @gestion, notice: 'Gestion was successfully updated.' } + format.html { redirect_to @gestion, notice: t(".flashes.updated") } format.json { render :show, status: :ok, location: @gestion } else format.html { render :edit } @@ -56,7 +56,7 @@ def update def destroy if @gestion.destroy respond_to do |format| - format.html { redirect_to gestions_url, notice: 'Gestion a bien été supprimé.' } + format.html { redirect_to gestions_url, notice: t(".flashes.destroyed") } format.json { head :no_content } end else diff --git a/app/views/gestions/_form.html.erb b/app/views/gestions/_form.html.erb index b8a65d927..c052fb11a 100644 --- a/app/views/gestions/_form.html.erb +++ b/app/views/gestions/_form.html.erb @@ -1,8 +1,12 @@ <%= form_for(@gestion, html: { class: "form-horizontal", role: "form" }) do |f| %> <% if @gestion.errors.any? %>