Skip to content

Commit

Permalink
Rename 'chain' method 'filter_chain'
Browse files Browse the repository at this point in the history
  • Loading branch information
olliebennett committed May 30, 2019
1 parent 4d0e4bd commit 7bd123b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/filterer/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ def filter(params = {}, opts = {})
delegate_to_filterer(:filter, params, opts)
end

def chain(params = {}, opts = {})
delegate_to_filterer(:chain, params, opts)
def filter_chain(params = {}, opts = {})
delegate_to_filterer(:filter_chain, params, opts)
end

private
Expand Down
2 changes: 1 addition & 1 deletion lib/filterer/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def filter_without_pagination(params = {}, opts = {})
end

# @return [ActiveRecord::Association]
def chain(params = {}, opts = {})
def filter_chain(params = {}, opts = {})
new(params, opts.merge(
skip_ordering: true,
skip_pagination: true
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/filterer/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def starting_query
it 'provides a helper method to skip both' do
expect_any_instance_of(DefaultParamsFilterer).to_not receive(:ordered_results)
expect_any_instance_of(DefaultParamsFilterer).to_not receive(:paginate_results)
filterer = DefaultParamsFilterer.chain({})
filterer = DefaultParamsFilterer.filter_chain({})
end

it 'provides a helper method to skip pagination' do
Expand Down

0 comments on commit 7bd123b

Please sign in to comment.