class Merit::SashFinder

Public Class Methods

find(rule, action) click to toggle source
# 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) click to toggle source
# File lib/merit/sash_finder.rb, line 11
def self.targets(rule, action)
  TargetFinder.find(rule, action).compact
end