añadir track_activity para mostrar futuras notificaciones a los usuarios

This commit is contained in:
Julian Herrero
2015-10-06 12:05:34 +02:00
committed by rgarcia
parent 5e9240e25c
commit ba0ce4e14b
6 changed files with 20 additions and 3 deletions

View File

@@ -1,5 +1,4 @@
class Activity < ActiveRecord::Base
belongs_to :actionable, -> { with_hidden }, polymorphic: true
belongs_to :user, -> { with_hidden }
@@ -24,5 +23,4 @@ class Activity < ActiveRecord::Base
def self.by(user)
where(user: user)
end
end

View File

@@ -199,7 +199,7 @@ class User < ActiveRecord::Base
def email_required?
!erased?
end
def has_official_email?
domain = Setting.value_for 'email_domain_for_officials'
!email.blank? && ( (email.end_with? "@#{domain}") || (email.end_with? ".#{domain}") )