Class: Wor::Paginate::Utils::PreserveRecordsHelper
- Inherits:
-
Object
- Object
- Wor::Paginate::Utils::PreserveRecordsHelper
- Defined in:
- lib/wor/paginate/utils/preserve_records_helper.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(content, url, options) ⇒ PreserveRecordsHelper
constructor
A new instance of PreserveRecordsHelper.
Constructor Details
#initialize(content, url, options) ⇒ PreserveRecordsHelper
Returns a new instance of PreserveRecordsHelper.
8 9 10 11 12 |
# File 'lib/wor/paginate/utils/preserve_records_helper.rb', line 8 def initialize(content, url, ) @content = content @url = url @options = end |
Instance Method Details
#call ⇒ Object
14 15 16 17 |
# File 'lib/wor/paginate/utils/preserve_records_helper.rb', line 14 def call [content.where("#{field} <= :last_value", last_value: last_value), UriHelper.replace_query_params(url, query_param_name => last_value)] end |