0

Users can have many clubs.

One club can tip another club.

How can I prevent a club from tipping itself?

(Note that if a user wants to engage as another club, they can tip another club they own, so I can't do this based on user id)

I've tried a number of variations but can't seem to make it work. Thanks for any help.

    # A club cannot tip itself
    cannot [:tip], Club, id: id
bft
  • 35
  • 1
  • 6

1 Answers1

0

I ended up creating a validation in my Transaction model, along with not showing the Tip button in my view.

bft
  • 35
  • 1
  • 6