ACL System restrict_to

Does the restrict_to method only work in the views for some reason? I
have tried it in the controller and i get the “undefined local variable
or method `restrict_to’ for Admin::SurveysController:Class” Ive even
copied the code from the access_control.rb in the plugin to the
application_helper but it still keeps giving the same error.

def restrict_to(logicstring, context = {})
return false if current_user.nil?
result = ‘’
if permit?(logicstring, context)
result = yield if block_given?



It seems that restrict_to only works in the views, but according to
the readme, it is meant to work in the controller.

i don’t get any errors thrown, but it doesn’t seem to work.

On Oct 18 2007, 4:48 pm, John B. <rails-mailing-l…@andreas-