summaryrefslogtreecommitdiff
path: root/app/models/company.rb
blob: c1c2d9f214c2bfaf923644c1bdc0693902fffc80 (plain)
1
2
3
4
5
6
7
8
9
class Company < ActiveRecord::Base
  has_many :licenses

  def filter_licenses_using(search_filters)
    result = self.licenses
    search_filters.each { |key, value| result = result.public_send(key, value) if value.present? }
    result
  end
end