Class: AlchemyCrm::ContactGroup
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- AlchemyCrm::ContactGroup
- Defined in:
- app/models/alchemy_crm/contact_group.rb
Instance Method Summary collapse
Instance Method Details
#contacts ⇒ Object
13 14 15 |
# File 'app/models/alchemy_crm/contact_group.rb', line 13 def contacts Contact.tagged_with(self., :any => true).where(filters_sql_string) end |
#filters_sql_string ⇒ Object
17 18 19 |
# File 'app/models/alchemy_crm/contact_group.rb', line 17 def filters_sql_string filters.map(&:sql_string).join(' AND ') end |
#humanized_name ⇒ Object
21 22 23 |
# File 'app/models/alchemy_crm/contact_group.rb', line 21 def humanized_name "#{self.name} (#{self.contacts.length})" end |