Skip to content

Commit

Permalink
Merge branch 'dev' into 146_ConsGerman_ProfilinfoPage
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaidd-Drwg committed Jan 4, 2017
2 parents eb0e9f8 + 126a100 commit c71f088
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/controllers/application_letters_controller.rb
Expand Up @@ -43,7 +43,7 @@ def create
@application_letter.user_id = current_user.id

if @application_letter.save
redirect_to @application_letter, notice: 'Application was successfully created.'
redirect_to @application_letter, notice: I18n.t('application_letters.successful_creation')
else
render :new
end
Expand Down
8 changes: 4 additions & 4 deletions app/controllers/profiles_controller.rb
Expand Up @@ -29,9 +29,9 @@ def create

if @profile.save
if flash[:event_id]
redirect_to new_application_letter_path(:event_id => flash[:event_id])
redirect_to new_application_letter_path(:event_id => flash[:event_id]), notice: I18n.t('profiles.successful_creation')
else
redirect_to @profile
redirect_to @profile, notice: I18n.t('profiles.successful_creation')
end
else
render :new
Expand All @@ -41,7 +41,7 @@ def create
# PATCH/PUT /profiles/1
def update
if @profile.update(profile_params)
redirect_to @profile, notice: 'Profile was successfully updated.'
redirect_to @profile, notice: I18n.t('profiles.successful_update')
else
render :edit
end
Expand All @@ -50,7 +50,7 @@ def update
# DELETE /profiles/1
def destroy
@profile.destroy
redirect_to profiles_url, notice: 'Profile was successfully destroyed.'
redirect_to profiles_url, notice: I18n.t('profiles.successful_deletion')
end

private
Expand Down
2 changes: 1 addition & 1 deletion config/locales/de.application_letters.yml
Expand Up @@ -15,7 +15,7 @@ de:
Programmierkenntnisse sind keine Voraussetzung zur Teilnahme. Diese Information
wird zur Gruppeneinteilung benötigt."
login_before_creation: "Du musst angemeldet sein, um dich für Workshops bewerben zu können."
successful_update: "Die Bewerbung wurde erfolgreich aktualisiert"
successful_update: "Bewerbung erfolgreich bearbeitet"
successful_deletion: "Bewerbung erfolgreich gelöscht"
successful_creation: "Bewerbung erfolgreich erstellt"
fill_in_profile_before_creation: "Du musst erst dein Profil ausfüllen, um dich für Workshops bewerben zu können."
Expand Down
2 changes: 1 addition & 1 deletion spec/features/profile_spec.rb
Expand Up @@ -124,7 +124,7 @@ def mock_writing_to_filesystem

find('input[name=commit]').click

expect(page).to have_text('Profile was successfully updated.')
expect(page).to have_text(I18n.t('profiles.successful_update'))
end

scenario "user fills in an invalid birth date" do
Expand Down

0 comments on commit c71f088

Please sign in to comment.