Constants in Events looks good now

This commit is contained in:
Andrew8xx8 2013-02-13 15:48:16 +04:00
parent b9f8b40190
commit 839957cf56
13 changed files with 43 additions and 43 deletions

View file

@ -37,15 +37,15 @@ class EventFilter
filter = params.dup
actions = []
actions << Event::Pushed if filter.include? 'push'
actions << Event::Merged if filter.include? 'merged'
actions << Event::PUSHED if filter.include? 'push'
actions << Event::MERGED if filter.include? 'merged'
if filter.include? 'team'
actions << Event::Joined
actions << Event::Left
actions << Event::JOINED
actions << Event::LEFT
end
actions << Event::Commented if filter.include? 'comments'
actions << Event::COMMENTED if filter.include? 'comments'
events = events.where(action: actions)
end