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

Version Path
social_stream-2.2.2 base/app/controllers/repositories_controller.rb
social_stream-base-2.2.2 app/controllers/repositories_controller.rb
social_stream-2.2.1 base/app/controllers/repositories_controller.rb
social_stream-base-2.2.1 app/controllers/repositories_controller.rb
social_stream-2.2.0 base/app/controllers/repositories_controller.rb
social_stream-base-2.2.0 app/controllers/repositories_controller.rb
social_stream-2.1.1 base/app/controllers/repositories_controller.rb
social_stream-2.1.0 base/app/controllers/repositories_controller.rb
social_stream-base-2.1.0 app/controllers/repositories_controller.rb
social_stream-2.0.4 base/app/controllers/repositories_controller.rb
social_stream-base-2.0.4 app/controllers/repositories_controller.rb
social_stream-2.0.3 base/app/controllers/repositories_controller.rb
social_stream-base-2.0.3 app/controllers/repositories_controller.rb
social_stream-2.0.2 base/app/controllers/repositories_controller.rb
social_stream-base-2.0.2 app/controllers/repositories_controller.rb
social_stream-2.0.1 base/app/controllers/repositories_controller.rb
social_stream-base-2.0.1 app/controllers/repositories_controller.rb
social_stream-2.0.0 base/app/controllers/repositories_controller.rb
social_stream-base-2.0.0 app/controllers/repositories_controller.rb
social_stream-2.0.0.beta3 base/app/controllers/repositories_controller.rb