You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to acl9-discuss
I was wondering if it was possible to create a central method to call
access_control.
So, in my application controller I would have a method called:
def mycontrol
access_control do
...
end
end
I'd like to run it from before_filter in several of my controllers
I might even think of adding parameters to the mycontrol method.
Which poses another problem of how I would do that.
Thanks for the help.
oleg dashevskii
unread,
Nov 16, 2009, 12:16:34 AM11/16/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to acl9-d...@googlegroups.com
Try following:
class ApplicationControler < ... def self.my_control access_control do # smth end end end
class OtherController < ApplicationController my_control
end