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

MEAP v17. Chapter 8, Listing 8.15 Assigning permission #6

Open
mikezx6r opened this issue Nov 10, 2014 · 2 comments
Open

MEAP v17. Chapter 8, Listing 8.15 Assigning permission #6

mikezx6r opened this issue Nov 10, 2014 · 2 comments

Comments

@mikezx6r
Copy link

I'm having a problem following examples and understanding how it works.

The permissions in the book seem to verify as to whether they have an underscore in them or not.

Verifying permissions, the code has 'create tickets', and yet the checkboxes on the screen appear to be using 'create_tickets'. I don't see anywhere where one gets converted to the other.

If I write my app as per the book, the permissions don't work correctly. As soon as I modify the can? and cannot? entries to include the underscore, everything works correctly.

I was asked to link to a Github repo, but I prefer Bitbucket.

https://bitbucket.org/mikezx6r/ticketee

Commits d1fded8 and f96f93d demonstrate the issue

I've also found the assigning_permissions_spec, 'Creating tickets for a project' doesn't appear to be testing the code. I can comment out the 'check_permission' for create_tickets and the test still passes.

@radar
Copy link
Contributor

radar commented Nov 11, 2014

Thanks for letting us know about this one @mikezx6r. I think you're right about the checkboxes having the wrong label.

We'll investigate this issue as well as the assigning_permissions_spec problem when we're reviewing Chapter 8, which is a chapter and a half from where we are at now.

@mikezx6r
Copy link
Author

No worries. Although it was initially frustrating, it did force me to slow down and REALLY try to understand what I was writing, and how the code was interacting.

Debugging can be a great educator.

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

No branches or pull requests

2 participants