You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
post=Post.new(user:beth,title:"Authorization made easy")
Wrap each user with an authorizer
authorized_mary=AuthorizedUser.new(mary)authorized_john=AuthorizedUser.new(john)authorized_beth=AuthorizedUser.new(beth)authorized_drew=AuthorizedUser.new(drew)# wrapped users continue to act like usersauthorized_beth.posts# => [#<Post:0x007fe35d081798 @title="Authorization made easy"...# if conflicts arise, simply access the originalauthorized_beth.user