diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-06-15 23:50:45 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-06-15 23:59:41 +0900 |
commit | b57b23a37bda0a5534b12a539797a23792780d74 (patch) | |
tree | b1123c76934ced70c3e105c518c1e72d3ccf1d24 /activerecord/lib/arel | |
parent | b388061947c087d0635619d7f0b3a2b1cc91a806 (diff) | |
download | rails-b57b23a37bda0a5534b12a539797a23792780d74.tar.gz rails-b57b23a37bda0a5534b12a539797a23792780d74.tar.bz2 rails-b57b23a37bda0a5534b12a539797a23792780d74.zip |
Remove unused `Arel::Attributes.for`
`Arel::Attributes.for` is no longer used since https://github.com/rails/arel/pull/196.
Diffstat (limited to 'activerecord/lib/arel')
-rw-r--r-- | activerecord/lib/arel/attributes.rb | 22 | ||||
-rw-r--r-- | activerecord/lib/arel/visitors/to_sql.rb | 6 |
2 files changed, 0 insertions, 28 deletions
diff --git a/activerecord/lib/arel/attributes.rb b/activerecord/lib/arel/attributes.rb deleted file mode 100644 index 35d586c948..0000000000 --- a/activerecord/lib/arel/attributes.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -require "arel/attributes/attribute" - -module Arel # :nodoc: all - module Attributes - ### - # Factory method to wrap a raw database +column+ to an Arel Attribute. - def self.for(column) - case column.type - when :string, :text, :binary then String - when :integer then Integer - when :float then Float - when :decimal then Decimal - when :date, :datetime, :timestamp, :time then Time - when :boolean then Boolean - else - Undefined - end - end - end -end diff --git a/activerecord/lib/arel/visitors/to_sql.rb b/activerecord/lib/arel/visitors/to_sql.rb index a1aa620f9d..eff7a0d036 100644 --- a/activerecord/lib/arel/visitors/to_sql.rb +++ b/activerecord/lib/arel/visitors/to_sql.rb @@ -689,12 +689,6 @@ module Arel # :nodoc: all join_name = o.relation.table_alias || o.relation.name collector << quote_table_name(join_name) << "." << quote_column_name(o.name) end - alias :visit_Arel_Attributes_Integer :visit_Arel_Attributes_Attribute - alias :visit_Arel_Attributes_Float :visit_Arel_Attributes_Attribute - alias :visit_Arel_Attributes_Decimal :visit_Arel_Attributes_Attribute - alias :visit_Arel_Attributes_String :visit_Arel_Attributes_Attribute - alias :visit_Arel_Attributes_Time :visit_Arel_Attributes_Attribute - alias :visit_Arel_Attributes_Boolean :visit_Arel_Attributes_Attribute def literal(o, collector); collector << o.to_s; end |