Sha256: 4d3b2721d7dcbf2e8cea692526c78514b21cd49e54edb81a86f9718b10f14f55

Contents?: true

Size: 549 Bytes

Versions: 39

Compression:

Stored size: 549 Bytes

Contents

class SccProductsController < ApplicationController
  before_action :find_resource, only: %i[show subscribe unsubscribe]
  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

39 entries across 39 versions & 1 rubygems

Version Path
foreman_scc_manager-1.8.9 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.8.8 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.8.7 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.8.6 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.8.5 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.8.4 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.7.1 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.8.3 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.8.2 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.8.1 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.8.0 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.7.0 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.6.3 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.6.2 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.6.1 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.6.0 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.5.1 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.5.0 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.4.0 app/controllers/scc_products_controller.rb