diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-05-12 15:50:07 -0700 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-05-12 15:50:07 -0700 |
commit | 562a0bf634bd61f61ebb0145d7626fb484e13c53 (patch) | |
tree | a19556bf59bbdd4539a232588cb325bda1acce4f /lib/arel/primitives | |
parent | fff47a5a5e92eccf949785231d1f6953d6fdc640 (diff) | |
download | rails-562a0bf634bd61f61ebb0145d7626fb484e13c53.tar.gz rails-562a0bf634bd61f61ebb0145d7626fb484e13c53.tar.bz2 rails-562a0bf634bd61f61ebb0145d7626fb484e13c53.zip |
some slight performance improvements
Diffstat (limited to 'lib/arel/primitives')
-rw-r--r-- | lib/arel/primitives/attribute.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/arel/primitives/attribute.rb b/lib/arel/primitives/attribute.rb index acc4d86a80..39de11be26 100644 --- a/lib/arel/primitives/attribute.rb +++ b/lib/arel/primitives/attribute.rb @@ -24,6 +24,10 @@ module Arel def original_relation relation.relation_for(self) end + + def original_attribute + original_relation[self] + end def format(object) object.to_sql(formatter) @@ -57,10 +61,6 @@ module Arel include Transformations module Congruence - # def self.included(klass) - # klass.hash_on :name - # end - # def history @history ||= [self] + (ancestor ? [ancestor, ancestor.history].flatten : []) end |