Authority looks really simple and succinct but I was wondering if you had any ideas on how it could be used with inherited_resources so that it could authorise the resource after it has been loaded. From what I can tell one needs to insert these checks manually which would defeat inherited_resources code minimisation strategy.
I dig that you want this to be as agnostic as possible, but just wondered if you'd come across this use-case already?
@brendon - Thanks!
I haven't used inherited_resources with Authority because I'm not a big fan of it. I appreciate José Valim and love his work on Devise, but I think inherited_resources obfuscates too much. Rails already makes controller code brief; I think it's just confusing if it disappears entirely. But that's my opinion.
That said, looking at the README, he has an example for when "you have to do something special but you don’t want to create a before filter for it". He shows this:
class ProjectsController < InheritedResources::Base
@project = Project.new(params[:project])
You could use that strategy to insert a call to authorize_action_for(@project).
If you wanted to get super fancy, you might be able to override his code generation to automatically include that step, but I'm not sure how hard that would be.
@brendon - cool. Good luck on your project, and let me know if I can answer any other questions!