Permalink
Browse files

added a visitor for Class objects

  • Loading branch information...
tenderlove committed Nov 16, 2010
1 parent f0139a1 commit ac38fcae4997d4cf6480820542ac2a4a1801b014
Showing with 12 additions and 0 deletions.
  1. +7 −0 History.txt
  2. +1 −0 lib/arel/visitors/to_sql.rb
  3. +4 −0 test/visitors/test_to_sql.rb
View
@@ -1,3 +1,10 @@
+== 2.0.3
+
+* Bug fixes
+
+ * Fixing Oracle support
+ * Added a visitor for "Class" objects
+
== 2.0.2
* Bug fixes
@@ -281,6 +281,7 @@ def visit_String o; quote(o, @last_column) end
alias :visit_TrueClass :visit_String
alias :visit_NilClass :visit_String
alias :visit_ActiveSupport_StringInquirer :visit_String
+ alias :visit_Class :visit_String
def quote value, column = nil
@connection.quote value, column
@@ -21,6 +21,10 @@ module Visitors
end
end
+ it "should visit_Class" do
+ @visitor.accept(DateTime).must_equal "'DateTime'"
+ end
+
it "should visit_DateTime" do
@visitor.accept DateTime.now
end

0 comments on commit ac38fca

Please sign in to comment.