Permalink
Browse files

No need to manually recreate the relation, just let the relation meth…

…od handles it
  • Loading branch information...
1 parent 3d3ba34 commit 955d2be5e36b3e2f684c08925ed71de0a5e2a560 @reu reu committed Jun 12, 2011
Showing with 1 addition and 4 deletions.
  1. +1 −4 activerecord/lib/active_record/base.rb
@@ -657,11 +657,8 @@ def reset_sequence_name #:nodoc:
# set_table_name "project"
# end
def set_table_name(value = nil, &block)
- @quoted_table_name = nil
+ @quoted_table_name = @arel_table = @relation = nil
define_attr_method :table_name, value, &block
- @arel_table = nil
-
- @relation = create_relation
end
alias :table_name= :set_table_name

0 comments on commit 955d2be

Please sign in to comment.