Acl_system2 undefined method `access_control'

I’ve installed acts_as_authenticated and have that working like a charm
and now would like to add the acl_system2 plugin so I can do some role
based authorization stuff.

I went ahead and installed the plugin like this:

ruby script\plugin source http://opensvn.csie.org/ezra/rails/plugins/dev/acl_system2

Then I installed the lib and test

ruby script\plugin install lib
ruby script\plugin install test

Created the role.rb model, etc. as per the readme file, then added this
to one of my controllers:

class CountryController < ApplicationController

before_filter :login_required
access_control [:new, :create, :update, :edit] => '(administrator)'
    ...

end

and get the following error when I call an action on this controller:

undefined method `access_control’ for CountryController:Class

I’m guessing there is more to installing this plugin?

Any ideas?

Thanks!

On Aug 5, 2006, at 10:27 AM, jim dandy wrote:

Then I installed the lib and test
access_control [:new, :create, :update, :edit] => ‘(administrator)’

Thanks!

Yeah you didn’t actually install the plugin with those command you
listed. Try this:

ruby script\plugin install http://opensvn.csie.org/ezra/rails/
plugins/dev/acl_system2

You need install instead of source there. Then you will be good to go.

-Ezra

Ezra Z. wrote:

On Aug 5, 2006, at 10:27 AM, jim dandy wrote:

Then I installed the lib and test
access_control [:new, :create, :update, :edit] => ‘(administrator)’

Thanks!

Yeah you didn’t actually install the plugin with those command you
listed. Try this:

ruby script\plugin install http://opensvn.csie.org/ezra/rails/
plugins/dev/acl_system2

You need install instead of source there. Then you will be good to go.

-Ezra

Thanks Ezra - works like a charm. Nice plugin - seems to work great thus
far.