Workaround for simple mode in/not_in, bump version

This commit is contained in:
Ernie Miller 2011-07-24 13:03:23 -04:00
parent 48891b9fc6
commit 119d470304
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -1,3 +1,3 @@
module Ransack
VERSION = "0.5.3"
VERSION = "0.5.4"
end