1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

added a visitor for Class objects

This commit is contained in:
Aaron Patterson 2010-11-16 08:15:58 -08:00
parent f0139a16c2
commit ac38fcae49
3 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,10 @@
== 2.0.3
* Bug fixes
* Fixing Oracle support
* Added a visitor for "Class" objects
== 2.0.2
* Bug fixes

View file

@ -281,6 +281,7 @@ module Arel
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

View file

@ -21,6 +21,10 @@ module Arel
end
end
it "should visit_Class" do
@visitor.accept(DateTime).must_equal "'DateTime'"
end
it "should visit_DateTime" do
@visitor.accept DateTime.now
end