mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
using aliases for terminal nodes
This commit is contained in:
parent
b95deec5c7
commit
e12513659d
1 changed files with 11 additions and 10 deletions
|
@ -210,17 +210,18 @@ module Arel
|
|||
alias :visit_Arel_Nodes_SqlLiteral :visit_Fixnum
|
||||
alias :visit_Arel_SqlLiteral :visit_Fixnum # This is deprecated
|
||||
|
||||
def visit_TrueClass o; quote(o) end
|
||||
def visit_String o; quote(o) end
|
||||
def visit_Hash o; quote(o) end
|
||||
def visit_ActiveSupport_Multibyte_Chars o; quote(o) end
|
||||
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
|
||||
def visit_FalseClass o; quote(o) end
|
||||
|
||||
alias :visit_ActiveSupport_Multibyte_Chars :visit_String
|
||||
alias :visit_BigDecimal :visit_String
|
||||
alias :visit_Date :visit_String
|
||||
alias :visit_DateTime :visit_String
|
||||
alias :visit_FalseClass :visit_String
|
||||
alias :visit_Float :visit_String
|
||||
alias :visit_Hash :visit_String
|
||||
alias :visit_Symbol :visit_String
|
||||
alias :visit_Time :visit_String
|
||||
alias :visit_TrueClass :visit_String
|
||||
|
||||
DISPATCH = Hash.new do |hash, klass|
|
||||
hash[klass] = "visit_#{klass.name.gsub('::', '_')}"
|
||||
|
|
Loading…
Reference in a new issue