app/models/entities/contact.rb in fat_free_crm-0.11.1 vs app/models/entities/contact.rb in fat_free_crm-0.11.2
- old
+ new
@@ -58,10 +58,12 @@
has_many :opportunities, :through => :contact_opportunities, :uniq => true, :order => "opportunities.id DESC"
has_many :tasks, :as => :asset, :dependent => :destroy#, :order => 'created_at DESC'
has_one :business_address, :dependent => :destroy, :as => :addressable, :class_name => "Address", :conditions => "address_type = 'Business'"
has_many :emails, :as => :mediator
+ serialize :subscribed_users, Set
+
accepts_nested_attributes_for :business_address, :allow_destroy => true
scope :created_by, lambda { |user| { :conditions => [ "user_id = ?", user.id ] } }
scope :assigned_to, lambda { |user| { :conditions => ["assigned_to = ?", user.id ] } }
@@ -80,10 +82,10 @@
}
uses_user_permissions
acts_as_commentable
acts_as_taggable_on :tags
- has_paper_trail
+ has_paper_trail :ignore => [ :subscribed_users ]
has_fields
exportable
sortable :by => [ "first_name ASC", "last_name ASC", "created_at DESC", "updated_at DESC" ], :default => "created_at DESC"
validates_presence_of :first_name, :message => :missing_first_name