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
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---