Sha256: 96e71578353d0394708165ea35eeb05d7660d5ed8cea643db530414ebce497f7

Contents?: true

Size: 625 Bytes

Versions: 2

Compression:

Stored size: 625 Bytes

Contents

module Spree
  module Admin
    class AffiliatesController < Spree::Admin::ResourceController
      helper_method :affiliate_partial_exists?
      before_filter :layout_options, only: [:new, :edit]

      def index
        @affiliates = Affiliate.all.page(params[:page]).per(Spree::Config[:admin_products_per_page])
      end

      protected

        def affiliate_partial_exists? partial
          return false if partial.blank? 
          Affiliate.lookup_for_partial lookup_context, partial
        end

        def layout_options
          @layout_options = Spree::Affiliate.layout_options
        end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spree_reffiliate-2.4.1 app/controllers/spree/admin/affiliates_controller.rb
spree_reffiliate-2.3.1 app/controllers/spree/admin/affiliates_controller.rb