Sha256: 2ecb141f51c269523b9183ddb339c88006896c6e07cccc8de806a994629edf10

Contents?: true

Size: 426 Bytes

Versions: 13

Compression:

Stored size: 426 Bytes

Contents

# frozen_string_literal: true

require_relative '../params/current_helper'

module Pagination
  module PathForHelper
    include Params::CurrentHelper

    def pagination_path_for(page)
      page ||= 1
      url_for paginate_params_for(page)
    end

    private

    def paginate_params_for(page)
      current_params
        .deep_merge(paginate: {
                      page: page
                    })
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
actionset-0.11.0 lib/action_set/helpers/pagination/path_for_helper.rb
actionset-0.10.0 lib/action_set/helpers/pagination/path_for_helper.rb
actionset-0.9.2 lib/action_set/helpers/pagination/path_for_helper.rb
actionset-0.9.1 lib/action_set/helpers/pagination/path_for_helper.rb
actionset-0.8.2 lib/action_set/helpers/pagination/path_for_helper.rb
actionset-0.8.1 lib/action_set/helpers/pagination/path_for_helper.rb
actionset-0.8.0 lib/action_set/helpers/pagination/path_for_helper.rb
actionset-0.7.0 lib/action_set/helpers/pagination/path_for_helper.rb
actionset-0.6.0 lib/action_set/helpers/pagination/path_for_helper.rb
actionset-0.5.4 lib/action_set/helpers/pagination/path_for_helper.rb
actionset-0.5.3 lib/action_set/helpers/pagination/path_for_helper.rb
actionset-0.5.2 lib/action_set/helpers/pagination/path_for_helper.rb
actionset-0.5.1 lib/action_set/helpers/pagination/path_for_helper.rb