lib/thinking_sphinx/attribute.rb in moneypools-thinking-sphinx-1.2.11 vs lib/thinking_sphinx/attribute.rb in moneypools-thinking-sphinx-1.2.12
- old
+ new
@@ -98,10 +98,13 @@
case type
when :string
adapter.convert_nulls(part)
when :datetime
adapter.cast_to_datetime(part)
+ when :multi
+ part = adapter.cast_to_datetime(part) if is_many_datetimes?
+ adapter.convert_nulls(part, 0)
else
part
end
}.join(', ')
@@ -149,11 +152,9 @@
# actual column's datatype is and returns that.
#
def type
@type ||= begin
base_type = case
- when is_many_datetimes?
- :datetime
when is_many?, is_many_ints?
:multi
when @associations.values.flatten.length > 1
:string
else
\ No newline at end of file