Skip to content

Instantly share code, notes, and snippets.

@bad6e
Last active January 23, 2018 23:44
Show Gist options
  • Save bad6e/ded96be25de70227d657e8ec41017213 to your computer and use it in GitHub Desktop.
Save bad6e/ded96be25de70227d657e8ec41017213 to your computer and use it in GitHub Desktop.
Set All Lender's TeamRole default to True
lender = Lender.find :id
team_roles = TeamRole.where(roleable_id: lender.id)
for role in team_roles
role.update(default: true)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment