-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove JaResource from ProjectGithubRepoController #1046
Remove JaResource from ProjectGithubRepoController #1046
Conversation
|
||
plug :load_resource, model: ProjectGithubRepo, only: [:show], preload: [:github_repo, :project] | ||
plug :load_and_authorize_changeset, model: ProjectGithubRepo, only: [:create] | ||
plug :load_and_authorize_resource, model: ProjectGithubRepo, only: [:delete] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@landongrindheim As you can see, we do actually need to support a delete action.
It's not clear here, but we likely also need to support an index action (it's implicit from us having a filter
function before). These are the reasons we're switching away from ja_resource
. Lot's of hidden stuff.
Basically, the controller needs to support
- index (with id filter)
- show
- create (with authorization)
- delete (with authorization)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use OrganizationGithubAppInstallationController
as a sort of template.
4664b79
to
8b8581d
Compare
@begedin I've added |
8b8581d
to
9b9f786
Compare
@landongrindheim looks great! I just rebased but have to step away for a moment. Feel free to merge once the tests pass. |
@joshsmith Merging is blocked for me currently |
Sorry about that! Didn't realize. Dismissed review and just merged for you. |
Thanks :) |
Remove JaResource/Canary from ProjectGithubRepoController
References
Closes #898
Progress on: #864