forked from SFEley/acts_as_icontact
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
39 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module ActsAsIcontact | ||
module Rails | ||
module ClassMethods | ||
module Lists | ||
|
||
# The lists that each new contact will be subscribed to upon creation. Set by the :list and :lists | ||
# options to acts_as_icontact. | ||
def icontact_default_lists | ||
@icontact_default_lists | ||
end | ||
|
||
protected | ||
|
||
# Builds an array of any lists in the :list or :lists parameter. | ||
def set_default_lists(list, lists) | ||
# Combines :list and :lists parameters into one array | ||
@icontact_default_lists = [] | ||
@icontact_default_lists << list if list | ||
@icontact_default_lists += lists if lists | ||
end | ||
|
||
end | ||
end | ||
end | ||
end |
This file contains 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
This file contains 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
This file contains 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