Class: Merit::SashFinder
- Inherits:
-
Object
- Object
- Merit::SashFinder
- Defined in:
- lib/merit/sash_finder.rb
Class Method Summary collapse
Class Method Details
.find(rule, action) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/merit/sash_finder.rb', line 3 def self.find(rule, action) targets(rule, action).map(&:_sash) rescue NoMethodError Rails.logger.warn "[merit] Couldn't find model to grant reputation to. " \ "Refer to https://github.com/tute/merit/issues/171#issuecomment-44185696." [] end |
.targets(rule, action) ⇒ Object
11 12 13 |
# File 'lib/merit/sash_finder.rb', line 11 def self.targets(rule, action) TargetFinder.find(rule, action).compact end |