summaryrefslogtreecommitdiff
path: root/app/models/conference.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-27 20:53:10 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-27 20:53:10 +0100
commit46eb56627a0d1f5142b79b476bbeb96f91a157d9 (patch)
tree0bdd9939964491576087d8d8a653e26543bf704a /app/models/conference.rb
parent67c1a0a951403a546250ea860a3e3d199cae2fce (diff)
parentef2acbfebeefdd17f8896a3e5eb44775febf4dee (diff)
Merge branch 'develop'5.1-beta7
Diffstat (limited to 'app/models/conference.rb')
-rw-r--r--app/models/conference.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/conference.rb b/app/models/conference.rb
index 8c5a752..aee75d5 100644
--- a/app/models/conference.rb
+++ b/app/models/conference.rb
@@ -31,7 +31,7 @@ class Conference < ActiveRecord::Base
validate :start_and_end_dates_must_make_sense, :if => Proc.new { |conference| !conference.start.blank? && !conference.end.blank? }
- after_save :send_pin_email_when_pin_has_changed
+ before_save :send_pin_email_when_pin_has_changed
default_scope where(:state => 'active').order(:start)
@@ -55,7 +55,7 @@ class Conference < ActiveRecord::Base
end
def send_pin_email_when_pin_has_changed
- if self.conferenceable.class == User && self.pin_changed?
+ if !self.new_record? && self.conferenceable.class == User && self.pin_changed?
Notifications.new_pin(self).deliver
end
end