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?
end
result
end
???
JB