Sha256: 73b50ceb83303bcda13580a6e0433d7a824de6c8ad2efe1a05ee7e93f41d39df

Contents?: true

Size: 578 Bytes

Versions: 6

Compression:

Stored size: 578 Bytes

Contents

class SccProductsController < ApplicationController
  before_filter :find_resource, only: %i[show subscribe unsubscribe]
  include Api::TaxonomyScope
  include Foreman::Controller::AutoCompleteSearch

  def index
    # TODO: Organization...
    @scc_products = SccProduct.all
    respond_to do |format|
      format.json { render json: @scc_products.to_json }
    end
  end

  def show
    respond_to do |format|
      format.json { render json: @scc_product.to_json }
    end
  end

  def subscribe
    @scc_product.subscribe
    redirect_to @scc_product.scc_account
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
foreman_scc_manager-1.3.0 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.2.0 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.1.3 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.1.2 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.1.1 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.1.0 app/controllers/scc_products_controller.rb