diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-25 03:51:44 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-25 03:51:44 +0200 |
| commit | baace1fa5df46694ddd515dc3bbca59b22df8692 (patch) | |
| tree | 6a8b587ca5d6d38377fe132b02c857f1c4149231 /app/controllers/occurrences_controller.rb | |
| parent | ed32bc6902ab634451539770bcd910662212e01a (diff) | |
Extract flashes to i18n and stop dispatching on submit labels
Diffstat (limited to 'app/controllers/occurrences_controller.rb')
| -rw-r--r-- | app/controllers/occurrences_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/occurrences_controller.rb b/app/controllers/occurrences_controller.rb index 0f30ce38..2e3c2ec1 100644 --- a/app/controllers/occurrences_controller.rb +++ b/app/controllers/occurrences_controller.rb | |||
| @@ -49,7 +49,7 @@ class OccurrencesController < ApplicationController | |||
| 49 | 49 | ||
| 50 | respond_to do |format| | 50 | respond_to do |format| |
| 51 | if @occurrence.save | 51 | if @occurrence.save |
| 52 | flash[:notice] = 'Occurrence was successfully created.' | 52 | flash[:notice] = t("flash.occurrences.created") |
| 53 | format.html { redirect_to(@occurrence) } | 53 | format.html { redirect_to(@occurrence) } |
| 54 | format.xml { render :xml => @occurrence, :status => :created, :location => @occurrence } | 54 | format.xml { render :xml => @occurrence, :status => :created, :location => @occurrence } |
| 55 | else | 55 | else |
| @@ -66,7 +66,7 @@ class OccurrencesController < ApplicationController | |||
| 66 | 66 | ||
| 67 | respond_to do |format| | 67 | respond_to do |format| |
| 68 | if @occurrence.update(occurrence_params) | 68 | if @occurrence.update(occurrence_params) |
| 69 | flash[:notice] = 'Occurrence was successfully updated.' | 69 | flash[:notice] = t("flash.occurrences.updated") |
| 70 | format.html { redirect_to(@occurrence) } | 70 | format.html { redirect_to(@occurrence) } |
| 71 | format.xml { head :ok } | 71 | format.xml { head :ok } |
| 72 | else | 72 | else |
