app/controllers/federails/client/actors_controller.rb in federails-0.2.0 vs app/controllers/federails/client/actors_controller.rb in federails-0.3.0
- old
+ new
@@ -1,13 +1,16 @@
module Federails
module Client
- class ActorsController < Federails::ApplicationController
+ class ActorsController < Federails::ClientController
before_action :set_actor, only: [:show]
# GET /app/actors
# GET /app/actors.json
def index
+ authorize Federails::Actor, policy_class: Federails::Client::ActorPolicy
+
@actors = policy_scope(Federails::Actor, policy_scope_class: Federails::Client::ActorPolicy::Scope).all
+ @actors = @actors.local if params[:local_only]
end
# GET /app/actors/1
# GET /app/actors/1.json
def show; end