Please sign in to comment.
Automagically set the filter_access_to to work with namespaced contro…
…llers Context by default is the controller_name.to_sym, however this breaks with the use of namespaced controllers (eg. Admin::FoozlesController) Instead of taking controller_instance.class.controller_name, this change takes the controller_instance.class.name and gsubs :: into _ so the resulting symbols look like :admin_foozles rather than :foozles This is a variant to the style implemented in viva-declarative_authorization: http://github.com/viva/declarative_authorization/commit/f3376b1cf557e119511479acb2c702d9139d7c44#diff-0
- Loading branch information...
Showing with 1 addition and 1 deletion.