Workaround for simple mode in/not_in, bump version
This commit is contained in:
parent
48891b9fc6
commit
119d470304
|
@ -16,7 +16,7 @@ module Ransack
|
|||
:a => attributes,
|
||||
:p => predicate.name,
|
||||
:m => combinator,
|
||||
:v => [values]
|
||||
:v => %w(in not_in).include?(predicate.arel_predicate) ? Array(values) : [values]
|
||||
)
|
||||
# TODO: Figure out what to do with multiple types of attributes, if anything.
|
||||
# Tempted to go with "garbage in, garbage out" on this one
|
||||
|
@ -113,7 +113,7 @@ module Ransack
|
|||
end
|
||||
|
||||
def value
|
||||
predicate.compound ? values.map {|v| v.cast(default_type)} : values.first.cast(default_type)
|
||||
predicate.wants_array ? values.map {|v| v.cast(default_type)} : values.first.cast(default_type)
|
||||
end
|
||||
|
||||
def build(params)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
module Ransack
|
||||
VERSION = "0.5.3"
|
||||
VERSION = "0.5.4"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue