Hi,

Using rail 2.2.2 and AS.

I am trying to disable certain custom action links, e..g foobar, on a
per-record basis. I got it working by using authorized_for_foobar? in
model. Then in action_link definition, the crud_type is defined as
foobar. It works with one twist. I had to modify file lib/
active_record_permissions.rb and remove the following line in method
authorized_for?

      raise ArgumentError, "unknown action #{options[:action]}" if
options[:action] and ![:create, :read, :update, :destroy].include?
(options[:action])

Apparently the only allowed actions are the standard ones.

Is it necessary? Maybe should include the defined custom action in the
list? I just don't like to modify this line of code in future upgrade.

Thanks,

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to