Sha256: 76504253e8da40115699d4bace07853295aee24b5ba8c9f07b93e0fdbf898160

Contents?: true

Size: 482 Bytes

Versions: 6

Compression:

Stored size: 482 Bytes

Contents

# This sets up aliases for old Metasearch query methods so they behave
# 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]
  end

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

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
yousty-activeadmin-1.0.4.pre lib/ransack_ext.rb
yousty-activeadmin-1.0.3.pre lib/ransack_ext.rb
yousty-activeadmin-1.0.2.pre lib/ransack_ext.rb
yousty-activeadmin-1.0.1.pre lib/ransack_ext.rb
yousty-activeadmin-1.0.0.pre lib/ransack_ext.rb
aa-rails4-0.6.0 lib/ransack_ext.rb