Hi Kristian,
Thanks for your response. As you can see in the
minimal repository I set up, the user model is just a standard devise user, so it does have a non-null email field. I also wasn't able to successfully use cantango-permits with my project, it gave me a several errors, probably because of my inexperience in configuring the right environment for it, since it now seems that cantango is spread across several different gems, and I couldn't find any information in setting them up the right way. I also tried with cantango branches major-refactor and cantango-1x, and even reverting to version 0.8.9.5, but everything failed in different ways. Maybe a you could give me some hint so I can use the cantango-permits project, I admit not having any experience in using experimental gems before, since I've been into ruby & rails for a couple of months only.
Anyway, as you noted that the problem was probably due to caching, I ended using up version 0.9.4.7 again and turned caching off by setting config.ability.mode = :no_cache as a temporary measure while I find the proper solution. After that I had to implement the patch shown in
another thread, since it gave me the same error, and I also had to add a dummy parameter to the roles_list because it seems that sometimes it is called with a role name parameter, like it thinks it is calling has_role? or something. I also added a temporary user permit to execute rules of the permissions.yml file, since it seems that the permissions engine depends on cache being turned on (could you confirm that this is the case, or is it possible to use the permissions engine in no_cache mode?).
After all that it seems the abilities are being executed fine, however now I'm running with another issue: when a page is requested it seems that the permits are being registered over and over again like 50 times or so, resulting in very slow page response times. When I turn debugging on,
this is the the output I get for a single page request where I make a single usuario_can? call (
this is the backtrace of all those messages - I have registered 2 permit clases, an user permit to simulate the permissions engine and a test role permit). Have you seen anything similar before?
I know you should be pretty busy with the refactoring right now, but I would highly appreciate any help on the subject.
Best regards,
Rabindranath
--
Rabindranath