Display a flash after sign in of user without SpeakerProfile

This commit is contained in:
Petko Bordjukov 2014-09-02 12:35:00 +03:00
parent f34de8f107
commit b0aa271b7b
3 changed files with 3 additions and 2 deletions

View File

@ -3,6 +3,7 @@ class SessionsController < Devise::SessionsController
if user.speaker_profile.present? if user.speaker_profile.present?
stored_location_for(user) || signed_in_root_path(user) stored_location_for(user) || signed_in_root_path(user)
else else
flash[:alert] = I18n.t(:please_fill_in_your_speaker_profile)
edit_user_registration_path edit_user_registration_path
end end
end end

View File

@ -19,7 +19,7 @@ bg:
login_with: "Влез с %{with}" login_with: "Влез с %{with}"
speaker_profile: Лекторски профил speaker_profile: Лекторски профил
please_fill_in_your_speaker_profile: Моля, попълнете данните в лекторския си профил please_fill_in_your_speaker_profile: Моля, попълнете данните в лекторския си профил.
expected_validation: "Очаква се потвърждение на: %{email}" expected_validation: "Очаква се потвърждение на: %{email}"
pass_update_hint1: Не попълвайте, ако не желаете да промените паролата си pass_update_hint1: Не попълвайте, ако не желаете да промените паролата си
pass_update_hint2: Попълнете, ако искате да промените паролата или e-mail адреса си. pass_update_hint2: Попълнете, ако искате да промените паролата или e-mail адреса си.

View File

@ -18,7 +18,7 @@ en:
login_with: "Login with %{with}" login_with: "Login with %{with}"
speaker_profile: Speaker's profile 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}" expected_validation: "Expected confirmation of: %{email}"
pass_update_hint1: Do not fill, if you do not want to change your password 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. pass_update_hint2: Fill this if you want to change your password or e-mail.