diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel/algebra/relations/relation.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/arel/algebra/relations/relation.rb b/lib/arel/algebra/relations/relation.rb index ef2108dcaa..ffd31ae470 100644 --- a/lib/arel/algebra/relations/relation.rb +++ b/lib/arel/algebra/relations/relation.rb @@ -84,14 +84,7 @@ module Arel module AttributeAccessable def [](index) - attr = attributes[index] - - # Handles a strange ActiveRecord case - if !attr && (index.is_a?(String) || index.is_a?(Symbol)) - attr = Attribute.new(self, index) - end - - attr + attributes[index] end def find_attribute_matching_name(name) |