app/models/actions/hear_action.rb in artfully_ose-1.2.0 vs app/models/actions/hear_action.rb in artfully_ose-1.3.0.pre1
- old
+ new
@@ -1,6 +1,9 @@
class HearAction < Action
+ validates_presence_of :person_id
+ MAILCHIMP_SENT = "Mailchimp (Sent)"
+
def action_type
"Hear"
end
def verb
@@ -10,12 +13,23 @@
def sentence
" heard from you"
end
def quip
- "heard from us (via #{subtype.downcase})"
+ subtype.nil? ? "heard from us" : "heard from us (via #{subtype.downcase})"
end
def self.subtypes
["Email", "Phone", "Postal", "Meeting", "Twitter", "Facebook", "Blog", "Press"]
end
+
+ def set_params(params, person)
+ super(params, person)
+ self.subject_id = params[:subject_id]
+ self.subject_type = params[:subject_type]
+ end
+
+ def can_wait?
+ (subtype == MAILCHIMP_SENT)
+ end
+
end
\ No newline at end of file