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
Doug Youch
committed
May 21, 2010
1 parent
ff70675
commit 87f0703
Showing
5 changed files
with
38 additions
and
7 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,17 @@ | ||
|
||
class EndUserActionSegmentType | ||
|
||
class ActionType < UserSegment::FieldType | ||
include HandlerActions | ||
|
||
def self.action_options | ||
self.get_handlers(:action).collect { |handler| [handler[1][:description], handler[1][:handler].to_s] } | ||
end | ||
|
||
register_operation :is, [['Action', :option, {:options => EndUserActionSegmentType::ActionType.action_options}]] | ||
|
||
def self.is(cls, field, action) | ||
cls.scoped(:conditions => ["#{field} = ?", action]) | ||
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