-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add AlbumPolicy::Scope & use in ArtistsController#show
I think this is more idiomatic use of Pundit and it simplifies `ArtistsController#show` nicely which will make adding an Atom feed for that action easier. I suspect there's a nicer way to implement the 2nd expression in the `if` statement in `AlbumPolicy::Scope#resolve`, but the one I've gone with seems to result in a sensible number of queries.
- Loading branch information
1 parent
2aa44ef
commit dff58b9
Showing
3 changed files
with
64 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters