Sha256: c4a1018dd6e8e3fc05d57e8acf12fa165cd1fefd8047fc7bdf00e9647bda5d43
Contents?: true
Size: 784 Bytes
Versions: 21
Compression:
Stored size: 784 Bytes
Contents
class RepositoriesController < ApplicationController before_filter :profile_or_current_subject! def show respond_to do |format| format.html { collection render collection if request.xhr? } format.json { render :json => collection } end end def search render SocialStream::Search.search(params[:q], current_subject, mode: :repository, owner: profile_subject!) end private def collection @collection ||= ActivityObject. select("DISTINCT activity_objects.*"). where(object_type: SocialStream.repository_models.map(&:to_s).map(&:classify)). includes(SocialStream.repository_models). collection(profile_or_current_subject, current_subject). page(params[:page]) end end
Version data entries
21 entries across 21 versions & 2 rubygems