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:
parent
f0139a16c2
commit
ac38fcae49
3 changed files with 12 additions and 0 deletions
|
@ -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 @@ 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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue