Sha256: 36ec1dac4acc1edf6a1701857c1e36f814ab6b15d36218d64ffd6e0e70760ef0

Contents?: true

Size: 829 Bytes

Versions: 20

Compression:

Stored size: 829 Bytes

Contents

module Katello
  class Api::V2::ContentViewHistoriesController < Api::V2::ApiController
    include Katello::Concerns::FilteredAutoCompleteSearch

    before_filter :find_content_view

    api :GET, "/content_views/:id/history", N_("Show a content view's history")
    param :id, :number, :desc => N_("content view numeric identifier"), :required => true
    def index
      respond_for_index :collection => scoped_search(index_relation.uniq, :katello_content_view_version_id, :asc, :resource_class => ContentViewHistory)
    end

    def index_relation
      ContentViewHistory.joins(:content_view_version).where("#{ContentViewVersion.table_name}.content_view_id" => @view.id)
    end

    private

    def find_content_view
      @view = ContentView.find(params[:content_view_id]) if params[:content_view_id]
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
katello-3.1.0.1 app/controllers/katello/api/v2/content_view_histories_controller.rb
katello-3.1.0 app/controllers/katello/api/v2/content_view_histories_controller.rb
katello-3.1.0.rc2.1 app/controllers/katello/api/v2/content_view_histories_controller.rb
katello-3.0.2 app/controllers/katello/api/v2/content_view_histories_controller.rb
katello-2.4.5 app/controllers/katello/api/v2/content_view_histories_controller.rb
katello-3.1.0.rc1 app/controllers/katello/api/v2/content_view_histories_controller.rb
katello-3.0.1 app/controllers/katello/api/v2/content_view_histories_controller.rb
katello-2.4.4 app/controllers/katello/api/v2/content_view_histories_controller.rb
katello-3.0.0 app/controllers/katello/api/v2/content_view_histories_controller.rb
katello-2.4.3 app/controllers/katello/api/v2/content_view_histories_controller.rb
katello-3.0.0.rc7 app/controllers/katello/api/v2/content_view_histories_controller.rb
katello-3.0.0.rc5 app/controllers/katello/api/v2/content_view_histories_controller.rb
katello-2.4.2 app/controllers/katello/api/v2/content_view_histories_controller.rb
katello-3.0.0.rc4 app/controllers/katello/api/v2/content_view_histories_controller.rb
katello-3.0.0.rc3 app/controllers/katello/api/v2/content_view_histories_controller.rb
katello-3.0.0.rc2 app/controllers/katello/api/v2/content_view_histories_controller.rb
katello-3.0.0.rc1 app/controllers/katello/api/v2/content_view_histories_controller.rb
katello-2.4.1 app/controllers/katello/api/v2/content_view_histories_controller.rb
katello-2.4.0 app/controllers/katello/api/v2/content_view_histories_controller.rb
katello-2.4.0.rc3 app/controllers/katello/api/v2/content_view_histories_controller.rb