Skip to content

Instantly share code, notes, and snippets.

@pdjota
Created March 25, 2011 19:02
Show Gist options
  • Save pdjota/887397 to your computer and use it in GitHub Desktop.
Save pdjota/887397 to your computer and use it in GitHub Desktop.
Team.transaction do
u1, u2 = @team.users_teams
u1.position = 'p2'
u2.position = 'p1'
u1.save!
u2.save!
@team.save!
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment