Skip to content

Commit

Permalink
Make User#take_associations_from more readable.
Browse files Browse the repository at this point in the history
  • Loading branch information
kcomandich committed Feb 10, 2015
1 parent c843f33 commit 316e500
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/open_conference_ware/user.rb
Expand Up @@ -258,10 +258,10 @@ def sessions

# For use in merging duplicate user records
def take_associations_from(dup)
dup.authentications.each { |a| self.authentications << a }
self.authentications += dup.authentications
self.user_favorites += dup.user_favorites
self.selector_votes += dup.selector_votes
dup.proposals.each { |p| p.add_user(self); p.remove_user(dup) }
dup.user_favorites.each { |f| self.user_favorites << f }
dup.selector_votes.each { |v| self.selector_votes << v }
end

protected
Expand Down

0 comments on commit 316e500

Please sign in to comment.