cantango with mongoid and devise

16 views
Skip to first unread message

Abhishek

unread,
Feb 1, 2012, 7:49:43 AM2/1/12
to cantango
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.

I have been stuck on this for 2 days, any help would be appreciated.
Reply all
Reply to author
Forward
0 new messages