Module: FriendlyId::Helpers
- Included in:
- NonSluggableClassMethods, SluggableClassMethods
- Defined in:
- lib/friendly_id/helpers.rb
Instance Method Summary collapse
-
#expected_size(ids_and_names, options) ⇒ Object
Calculate expected result size for find_some_with_friendly (taken from active_record/base.rb).
Instance Method Details
#expected_size(ids_and_names, options) ⇒ Object
Calculate expected result size for find_some_with_friendly (taken from active_record/base.rb)
6 7 8 9 10 |
# File 'lib/friendly_id/helpers.rb', line 6 def expected_size(ids_and_names, ) #:nodoc:# size = [:offset] ? ids_and_names.size - [:offset] : ids_and_names.size size = [:limit] if [:limit] && size > [:limit] size end |