I would suggest adding a new scope for type so that these can be changed together, something like:

```ruby
def type(type=nil)
  where(type: type) if type
end

...

member.group_memberships.named.type(type)
```