diff options
-rw-r--r-- | lib/arel/visitors/to_sql.rb | 1 | ||||
-rw-r--r-- | spec/arel/visitors/to_sql_spec.rb | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index d45253abd5..dc3dbc14c0 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -168,6 +168,7 @@ module Arel def visit_Symbol o; quote(o) end def visit_Time o; quote(o) end def visit_Date o; quote(o) end + def visit_DateTime o; quote(o) end def visit_Float o; quote(o) end def visit_BigDecimal o; quote(o) end diff --git a/spec/arel/visitors/to_sql_spec.rb b/spec/arel/visitors/to_sql_spec.rb index 39d7a7249c..ed8487c6eb 100644 --- a/spec/arel/visitors/to_sql_spec.rb +++ b/spec/arel/visitors/to_sql_spec.rb @@ -8,6 +8,10 @@ module Arel @attr = Table.new(:users)[:id] end + it "should visit_DateTime" do + @visitor.accept DateTime.now + end + it "should visit_Float" do @visitor.accept 2.14 end |