Include Authority::Controller
As we discussed on Github, authorize_actions_for
is defined in Authority::Controller
.
In a normal Rails app, that module gets included into ActionController::Base
by Authority's railtie.rb
. Apparently the railtie isn't being required when using rails-api (maybe the Rails
constant isn't defined?).
You can include the appropriate module yourself, though:
class ApplicationController < ActionController::Base
include Authority::Controller
end