Skip to content

Commit 9565c58

Browse files
committed
Use .name instead of .to_s for a symbol (follow up to dcd91db)
1 parent dcd91db commit 9565c58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activerecord/lib/arel/table.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def having(expr)
8080
end
8181

8282
def [](name, table = self)
83-
name = name.to_s if name.is_a?(Symbol)
83+
name = name.name if name.is_a?(Symbol)
8484
name = @klass.attribute_aliases[name] || name if @klass
8585
Attribute.new(table, name)
8686
end

0 commit comments

Comments
 (0)