Skip to content
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

Fix permissions #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Fix permissions #9

wants to merge 3 commits into from

Conversation

jkraemer
Copy link

this pull request addresses the 'how does it work' comment in vote_on_issues_controller.rb

permissions have to reflect controller and action names. I thus changed them in init.rb and changed the permission checks in the view. lastly I added the authorize filter to the controller.

To make things a bit more elegant I introduced a separete destroy method for removing votes and made vote_on_issue a resource in the routes.

- also cleans up the routing a bit, uses DELETE for removing the vote
- and changes the view hook to not use js to render the numbers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant