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-4.0.0 app/controllers/scc_products_controller.rb
foreman_scc_manager-3.1.1 app/controllers/scc_products_controller.rb
foreman_scc_manager-3.1.0 app/controllers/scc_products_controller.rb
foreman_scc_manager-3.0.0 app/controllers/scc_products_controller.rb
foreman_scc_manager-2.3.0 app/controllers/scc_products_controller.rb
foreman_scc_manager-2.2.3 app/controllers/scc_products_controller.rb
foreman_scc_manager-2.2.2 app/controllers/scc_products_controller.rb
foreman_scc_manager-2.2.1 app/controllers/scc_products_controller.rb
foreman_scc_manager-2.2.0 app/controllers/scc_products_controller.rb
foreman_scc_manager-2.1.0 app/controllers/scc_products_controller.rb
foreman_scc_manager-2.0.0 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.8.20 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.8.19 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.8.18 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.8.17 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.8.16 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.8.15 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.8.13 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.8.12 app/controllers/scc_products_controller.rb
foreman_scc_manager-1.8.10 app/controllers/scc_products_controller.rb