aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2009-08-27 16:49:16 -0300
committerEmilio Tagua <miloops@gmail.com>2009-08-27 16:49:16 -0300
commitd56e987757923fa28ae90cf269707b78b744d66d (patch)
treee1965017c90c55511a80cebe15f8eb21485aaefe /activerecord/lib/active_record
parent53f6c6d24e6fb25a62144c6ef5020cc04a893f56 (diff)
downloadrails-d56e987757923fa28ae90cf269707b78b744d66d.tar.gz
rails-d56e987757923fa28ae90cf269707b78b744d66d.tar.bz2
rails-d56e987757923fa28ae90cf269707b78b744d66d.zip
No need to reload the relation table with a method param, just nil it.
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-xactiverecord/lib/active_record/base.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 2fc7b1e9c6..c11c049415 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1365,9 +1365,7 @@ module ActiveRecord #:nodoc:
# end
def reset_column_information
undefine_attribute_methods
- # Reload ARel relation cached table
- arel_table(table_name, true)
- @column_names = @columns = @columns_hash = @content_columns = @dynamic_methods_hash = @inheritance_column = nil
+ @arel_table = @column_names = @columns = @columns_hash = @content_columns = @dynamic_methods_hash = @inheritance_column = nil
end
def reset_column_information_and_inheritable_attributes_for_all_subclasses#:nodoc:
@@ -1535,9 +1533,9 @@ module ActiveRecord #:nodoc:
end
- def arel_table(table = nil, reload = nil)
+ def arel_table(table = nil)
table = table_name if table.blank?
- if reload || @arel_table.nil? || @arel_table.name != table
+ if @arel_table.nil? || @arel_table.name != table
@arel_table = Relation.new(self, Arel::Table.new(table))
end
@arel_table