fixes failing email specs
Conflicts: app/models/user.rb fixes missing i18n entry fixes badly done merge fixes i18n issues force build to start
This commit is contained in:
@@ -61,4 +61,4 @@ Code published under AFFERO GPL v3 (see [LICENSE-AGPLv3.txt](LICENSE-AGPLv3.txt)
|
|||||||
|
|
||||||
## Contributions
|
## Contributions
|
||||||
|
|
||||||
See [CONTRIBUTING_EN.md](CONTRIBUTING_EN.md)
|
See [CONTRIBUTING_EN.md](CONTRIBUTING_EN.md)
|
||||||
@@ -83,7 +83,7 @@ class ApplicationController < ActionController::Base
|
|||||||
|
|
||||||
def ensure_signup_complete
|
def ensure_signup_complete
|
||||||
if user_signed_in? &&
|
if user_signed_in? &&
|
||||||
current_user.pending_finish_signup? &&
|
current_user.registering_with_oauth &&
|
||||||
%w(finish_signup do_finish_signup).exclude?(action_name)
|
%w(finish_signup do_finish_signup).exclude?(action_name)
|
||||||
redirect_to finish_signup_path
|
redirect_to finish_signup_path
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def after_sign_in_path_for(resource)
|
def after_sign_in_path_for(resource)
|
||||||
if resource.pending_finish_signup?
|
if resource.registering_with_oauth
|
||||||
finish_signup_path
|
finish_signup_path
|
||||||
else
|
else
|
||||||
super(resource)
|
super(resource)
|
||||||
|
|||||||
@@ -183,8 +183,8 @@ class User < ActiveRecord::Base
|
|||||||
self[:locale] ||= I18n.default_locale.to_s
|
self[:locale] ||= I18n.default_locale.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
def pending_finish_signup?
|
def confirmation_required?
|
||||||
email.blank? && unconfirmed_email.blank?
|
super && !registering_with_oauth
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|||||||
Reference in New Issue
Block a user