lib/ransack/nodes/value.rb in ransack-0.5.1 vs lib/ransack/nodes/value.rb in ransack-0.5.2
- old
+ new
@@ -1,10 +1,10 @@
module Ransack
module Nodes
class Value < Node
attr_accessor :value
- delegate :blank?, :present?, :to => :value
+ delegate :present?, :blank?, :to => :value
def initialize(context, value = nil)
super(context)
@value = value
end
@@ -21,10 +21,10 @@
def hash
value.hash
end
- def cast_to_type(type)
+ def cast(type)
case type
when :date
cast_to_date(value)
when :datetime, :timestamp, :time
cast_to_time(value)
\ No newline at end of file