diff --git a/app/controllers/admin/places_controller.rb b/app/controllers/admin/places_controller.rb index df3a136..14d8272 100644 --- a/app/controllers/admin/places_controller.rb +++ b/app/controllers/admin/places_controller.rb @@ -32,7 +32,7 @@ def create respond_to do |format| if @place.save - format.html { redirect_to admin_places_path, notice: t('place.created-success') } + format.html { redirect_to admin_places_path, notice: t('admin.place.creation-success') } else format.html { render :new } end @@ -43,7 +43,7 @@ def create def update respond_to do |format| if @place.update(place_params) - format.html { redirect_to admin_places_path, notice: t('place.update-success') } + format.html { redirect_to admin_places_path, notice: t('admin.place.update-success') } else format.html { render :edit } end @@ -54,7 +54,7 @@ def update def destroy @place.destroy respond_to do |format| - format.html { redirect_to admin_places_url, notice: t('place.deletion-success') } + format.html { redirect_to admin_places_url, notice: t('admin.place.deletion-success') } end end @@ -66,6 +66,7 @@ def set_place # Only allow a list of trusted parameters through. def place_params - params.require(:place).permit(:name, :building_name, :note, :pricing_note, :address, :active) + params.require(:place).permit(:name, :building_name, :note, + :pricing_note, :address, :active) end end diff --git a/config/locales/admin.de.yml b/config/locales/admin.de.yml index b157bcd..976ab43 100644 --- a/config/locales/admin.de.yml +++ b/config/locales/admin.de.yml @@ -17,6 +17,10 @@ de: select_dow: Wochentag auswählen select_place: Ort auswählen select_style: Style auswählen + place: + creation-success: Ort erstellt + deletion-success: Ort gelöscht + update-success: Ort aktualisiert places: add_course: Kurs hinzufügen all: Alle Orte