Skip to content

Instantly share code, notes, and snippets.

@mib32
Created January 9, 2015 21:04
Show Gist options
  • Save mib32/145c3ca4832a622b09c8 to your computer and use it in GitHub Desktop.
Save mib32/145c3ca4832a622b09c8 to your computer and use it in GitHub Desktop.
(byebug) user.spree_roles
#<ActiveRecord::Associations::CollectionProxy [#<Spree::Role id: 1, name: "doctor">, #<Spree::Role id: 2, name: "clinic">]>
(byebug) user.spree_roles.where(name: 'doctor')
#<ActiveRecord::AssociationRelation []>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment