Created
December 10, 2010 12:02
-
-
Save benlangfeld/736128 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CallCampaign < ActiveRecord::Base | |
| has_many :campaign_targets, :autosave => true | |
| has_many :call_lists, :through => :campaign_targets | |
| has_many :phone_numbers, :through => :call_lists | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CallList < ActiveRecord::Base | |
| attr_accessible :name | |
| has_many :call_list_memberships, :foreign_key => :call_list_id | |
| has_many :phone_numbers, :through => :call_list_memberships | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CallListMembership < ActiveRecord::Base | |
| attr_accessible :call_list_id, :phone_number_id | |
| belongs_to :call_list | |
| belongs_to :phone_number | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PhoneNumber < ActiveRecord::Base | |
| has_many :call_list_memberships | |
| has_many :call_lists, :through => :call_list_memberships | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment