Sha256: 3e0bb61880e19bdeba08a3af80c7fb72c121c0124cc59247012102dcd5e0c3e4

Contents?: true

Size: 1005 Bytes

Versions: 10

Compression:

Stored size: 1005 Bytes

Contents

# rubocop:disable Naming/MethodName
# rubocop:disable Naming/UncommunicativeMethodParamName

module Arel
  module Visitors
    class ToSql
      def visit_Arel_Attributes_Attribute(o, collector)
        if o.relation
          join_name = o.relation.table_alias || o.relation.name
          collector << "#{quote_table_name join_name}.#{quote_column_name o.name}"
        else
          visit_Arel_Nodes_UnqualifiedColumn o, collector
        end
      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
    end
  end
end

# rubocop:enable Naming/MethodName
# rubocop:enable Naming/UncommunicativeMethodParamName

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
arel_toolkit-0.4.9 lib/arel/extensions/to_sql.rb
arel_toolkit-0.4.8 lib/arel/extensions/to_sql.rb
arel_toolkit-0.4.7 lib/arel/extensions/to_sql.rb
arel_toolkit-0.4.6 lib/arel/extensions/to_sql.rb
arel_toolkit-0.4.5 lib/arel/extensions/to_sql.rb
arel_toolkit-0.4.4 lib/arel/extensions/to_sql.rb
arel_toolkit-0.4.3 lib/arel/extensions/to_sql.rb
arel_toolkit-0.4.2 lib/arel/extensions/to_sql.rb
arel_toolkit-0.4.1 lib/arel/extensions/to_sql.rb
arel_toolkit-0.4.0 lib/arel/extensions/to_sql.rb