Sha256: 1fa00998834ed2a943825352dcc26607df41a39b66b018dda093c50588a31c82
Contents?: true
Size: 797 Bytes
Versions: 1
Compression:
Stored size: 797 Bytes
Contents
module Federails module Client class ActivitiesController < Federails::ClientController before_action :authenticate_user!, only: [:feed] before_action :authorize_action! # GET /app/activities # GET /app/activities.json def index @activities = policy_scope(Federails::Activity, policy_scope_class: Federails::Client::ActivityPolicy::Scope).all @activities = @activities.where actor: Actor.find_param(params[:actor_id]) if params[:actor_id] end # GET /app/feed # GET /app/feed.json def feed @activities = Activity.feed_for(current_user.actor) end private def authorize_action! authorize(Federails::Activity, policy_class: Federails::Client::ActivityPolicy) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
federails-0.3.0 | app/controllers/federails/client/activities_controller.rb |