Module: Vigilante::FinderHelper::ClassMethods
- Defined in:
- lib/vigilante/finder_helper.rb
Instance Method Summary collapse
Instance Method Details
#operator_extent(operator) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/vigilante/finder_helper.rb', line 11 def operator_extent(operator) extent = operator.permits.get_extent_of(self.name.underscore.pluralize, :show) if extent.include?('*') nil else # fix: if extent is empty return 0 which would can be used in sql and not match anything extent.size == 0 ? '0' : extent.join(',') end end |