Hi, I would like to know if there is a way to add an "expired_at" field to the relation between User and Role ? Couldn't find any information about something like this.
So I could do something like :
room = Chat::Room.find(1)
sarah = User.find(1)
david = User.find(2)
# Today
sarah.add_role :muted, room, 7.days.from_now
david.add_role :muted, room
sarah.has_role? :muted, room # should return true
david.has_role? :muted, room # should return true
# A week later
sarah.has_role? :muted, room # should return false
david.has_role? :muted, room # should return true
Hi, I would like to know if there is a way to add an "expired_at" field to the relation between User and Role ? Couldn't find any information about something like this.
So I could do something like :
Thanks.