From b0aa271b7b666133e5a144182dcac579b29edf99 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Tue, 2 Sep 2014 12:35:00 +0300 Subject: [PATCH] Display a flash after sign in of user without SpeakerProfile --- app/controllers/sessions_controller.rb | 1 + config/locales/views.bg.yml | 2 +- config/locales/views.en.yml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index c9f6a1a..a96dbeb 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -3,6 +3,7 @@ class SessionsController < Devise::SessionsController if user.speaker_profile.present? stored_location_for(user) || signed_in_root_path(user) else + flash[:alert] = I18n.t(:please_fill_in_your_speaker_profile) edit_user_registration_path end end diff --git a/config/locales/views.bg.yml b/config/locales/views.bg.yml index ac5620f..0981496 100644 --- a/config/locales/views.bg.yml +++ b/config/locales/views.bg.yml @@ -19,7 +19,7 @@ bg: login_with: "Влез с %{with}" speaker_profile: Лекторски профил - please_fill_in_your_speaker_profile: Моля, попълнете данните в лекторския си профил + please_fill_in_your_speaker_profile: Моля, попълнете данните в лекторския си профил. expected_validation: "Очаква се потвърждение на: %{email}" pass_update_hint1: Не попълвайте, ако не желаете да промените паролата си pass_update_hint2: Попълнете, ако искате да промените паролата или e-mail адреса си. diff --git a/config/locales/views.en.yml b/config/locales/views.en.yml index 59d7c50..f221e48 100644 --- a/config/locales/views.en.yml +++ b/config/locales/views.en.yml @@ -18,7 +18,7 @@ en: login_with: "Login with %{with}" speaker_profile: Speaker's profile - please_fill_in_your_speaker_profile: Please fill in your speaker profile + please_fill_in_your_speaker_profile: Please fill in your speaker profile. expected_validation: "Expected confirmation of: %{email}" pass_update_hint1: Do not fill, if you do not want to change your password pass_update_hint2: Fill this if you want to change your password or e-mail.