2014-08-31 16:02:56 +03:00
|
|
|
class SessionsController < Devise::SessionsController
|
|
|
|
def after_sign_in_path_for(user)
|
|
|
|
if user.speaker_profile.present?
|
|
|
|
stored_location_for(user) || signed_in_root_path(user)
|
|
|
|
else
|
2014-09-02 12:35:00 +03:00
|
|
|
flash[:alert] = I18n.t(:please_fill_in_your_speaker_profile)
|
2014-08-31 16:02:56 +03:00
|
|
|
edit_user_registration_path
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|