lib/mls/inquiry.rb in mls-1.4.0 vs lib/mls/inquiry.rb in mls-1.4.3
- old
+ new
@@ -1,6 +1,11 @@
class Inquiry < MLS::Model
+ has_many :emails
belongs_to :lead
belongs_to :subject, polymorphic: true
+
+ def property
+ subject.is_a? MLS::Model::Listing ? subject.property : subject
+ end
end