kristianmandrup/cantango — Issue #19: cantango with mongoid and devise
Author: abhiabhi
Created: 2012-02-01 12:54:21+00:00
State: open

I am trying to implement cantango with mongoid and devise.

I have successfully setup devise with mongoid. but i am trying to
configure cantango, every time it says

undefinded method 'user_can?' for <#class .....

after some debugging, it seems that cantango is not registering the
methods user_can? and user_cannot? with current user. instead it
attached this methods to CanTango::Rails::Helpers::ControllerHelper
and CanTango::Rails::Helpers::ViewHelper.

i already have added tango_user call in my user.rb, but no luck.

I also have tried to explicitly call the cantango core methods to add
this methods to the user model. but then it gives some weird error
that undefined method inject for string at cantango (0.9.4.7) lib/
cantango/permission_engine/statements.rb:19:in `parse_statements'

i tried changing every possible configuration options. but no luck.

I am using ruby 1.9.2 with rails 3.0.10.
Any help would be appreciated.