View nginx.conf
1 2 3 4 5 6 7 8 9 10
 
ssl on;
ssl_certificate /opt/nginx/certs/domain.crt;
ssl_certificate_key /opt/nginx/certs/domain.key;
ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS";
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
View nginx.con
1 2 3
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
underscores_in_headers on;
View nginx.conf
1 2 3
ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS";
ssl_prefer_server_ciphers on;
View nginx.conf
1 2 3
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
View membership.rb
1 2 3 4 5 6 7 8 9 10
class Membership
 
belongs_to :user
belogns_to :group
 
after_save :send_notifications, if: ->(m) { m.accepted_changed? && m.accepted? }
 
def send_notifications
Resque.enqeue(NotificationMailerWorker, self.id, user.id)
Resque.enqeue(PushNotifcations::NewMembershipWorker, self.id, user.id)
View membership.rb
1 2 3 4 5 6 7 8 9 10
class Membership
 
belongs_to :user
belogns_to :group
 
after_save :send_notifications, if: ->(m) { m.accepted_changed? && m.accepted? }
 
def send_notifications
Resque.enqeue(NotificationMailerWorker, self.id, user.id)
Resque.enqeue(PushNotifcations::NewMembershipWorker, self.id, user.id)
View membership.rb
1 2 3 4 5 6 7 8 9 10
class Membership
 
belongs_to :user
belogns_to :group
 
after_save :send_notifications, if: ->(m) { m.accepted_changed? && m.accepted? }
 
def send_notifications
Resque.enqueue MembershipNotificationsWorker, self.id
end
View membership.rb
1 2 3 4 5 6 7 8 9 10
class Membership
 
belongs_to :user
belogns_to :group
 
after_save :send_notifications, if: ->(m) { m.accepted_changed? && m.accepted? }
 
def send_notifications
NotificationMailer.accepted(self, user).deliver!
PushNotifcations::NewMembership.new(self, user).dispatch!
View membership.rb
1 2 3 4 5 6 7 8 9 10
class Membership
 
belongs_to :user
belogns_to :group
 
after_save :send_notifications, if: ->(m) { m.accepted_changed? && m.accepted? }
 
def send_notifications
NotificationMailer.accepted(self, user).deliver!
PushNotifcations::NewMembership.new(self, user).dispatch!
View membership.rb
1 2 3 4 5 6 7 8 9 10
class Membership
 
belongs_to :user
belongs_to :group
 
after_save :send_notifications, if: ->(m) { m.accepted_changed? && m.accepted? }
 
def send_notifications
NotificationMailer.accepted(self, user).deliver!
NotificationMailer.accepted_admin(self, group.admin).deliver!
Something went wrong with that request. Please try again.