mirror of
https://github.com/activerecord-hackery/ransack.git
synced 2022-11-09 13:47:45 -05:00
Remove blank params from sort_link, close issue 158
Fixes issue 158 (github.com/ernie/ransack/issues/158)
This commit is contained in:
parent
9e719185f6
commit
7597f0da50
1 changed files with 2 additions and 0 deletions
|
@ -18,6 +18,8 @@ module Ransack
|
|||
@context = Context.for(object, options)
|
||||
@context.auth_object = options[:auth_object]
|
||||
@base = Nodes::Grouping.new(@context, 'and')
|
||||
params = (params.delete_if { |k, v| v.blank? && v != false }
|
||||
) if params.present?
|
||||
build(params.with_indifferent_access)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue