diff --git a/app/controllers/stacks_controller.rb b/app/controllers/stacks_controller.rb index f59be88ea..9fa05d614 100644 --- a/app/controllers/stacks_controller.rb +++ b/app/controllers/stacks_controller.rb @@ -28,7 +28,7 @@ def create respond_to do |format| if @stack.save - format.html { redirect_to stacks_path, notice: 'Stack was successfully created.' } + format.html { redirect_to stacks_path, notice: t(".flashes.created") } format.json { render :show, status: :created, location: @stack } else format.html { render :new } @@ -42,7 +42,7 @@ def create def update respond_to do |format| if @stack.update(stack_params) - format.html { redirect_to stacks_path, notice: 'Stack was successfully updated.' } + format.html { redirect_to stacks_path, notice: t(".flashes.updated") } format.json { render :show, status: :ok, location: @stack } else format.html { render :edit } @@ -56,7 +56,7 @@ def update def destroy if @stack.destroy respond_to do |format| - format.html { redirect_to stacks_url, notice: 'Stack a bien été supprimé.' } + format.html { redirect_to stacks_url, notice: t(".flashes.destroyed") } format.json { head :no_content } end else diff --git a/app/views/stacks/_form.html.erb b/app/views/stacks/_form.html.erb index d334f5407..780c5d1dc 100644 --- a/app/views/stacks/_form.html.erb +++ b/app/views/stacks/_form.html.erb @@ -1,8 +1,12 @@ <%= form_for(@stack, html: { class: "form-horizontal", role: "form" }) do |f| %> <% if @stack.errors.any? %>