Skip to content

Commit

Permalink
No need to manually recreate the relation, just let the relation meth…
Browse files Browse the repository at this point in the history
…od handles it
  • Loading branch information
reu committed Jun 12, 2011
1 parent 3d3ba34 commit 955d2be
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions activerecord/lib/active_record/base.rb
Expand Up @@ -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

Expand Down

0 comments on commit 955d2be

Please sign in to comment.