has_permalink + cancan issue #921

legos opened this Issue Aug 17, 2013 · 1 comment


None yet

1 participant

legos commented Aug 17, 2013

I'm using the has_permalink gem with cancan and devise. I've setup role based permissions for admins to be able to manage evenything in an admin namespace. When trying to edit an article by accessing the URL - /admin/articles/test-article/edit, I get the following error

ActiveRecord::RecordNotFound in Admin::ArticlesController#edit Couldn't find Article with id=test-article

However, accessing the URL as follows works - /admin/articles/10/edit

How do I get cancan to recognize that the articles use the permalink as their id?

legos commented Aug 18, 2013

Nevermind, I didn't read the entire wiki :)

@legos legos closed this Aug 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment