Skip to content

Commit

Permalink
rename some variables
Browse files Browse the repository at this point in the history
  • Loading branch information
seanlinsley committed Dec 22, 2013
1 parent 1c895e2 commit 128379b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/ransack_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# identically to the versions given in Ransack.
#
Ransack.configure do |config|
{'contains'=>'cont', 'starts_with'=>'start', 'ends_with'=>'end'}.each do |old,new|
config.add_predicate old, Ransack::Constants::DERIVED_PREDICATES.detect{ |q, args| q == new }[1]
{'contains'=>'cont', 'starts_with'=>'start', 'ends_with'=>'end'}.each do |old,current|
config.add_predicate old, Ransack::Constants::DERIVED_PREDICATES.detect{ |q, _| q == current }[1]
end

{'equals'=>'eq', 'greater_than'=>'gt', 'less_than'=>'lt'}.each do |old,new|
config.add_predicate old, arel_predicate: new
{'equals'=>'eq', 'greater_than'=>'gt', 'less_than'=>'lt'}.each do |old,current|
config.add_predicate old, arel_predicate: current
end
end

0 comments on commit 128379b

Please sign in to comment.