Class: SolidusPromotions::Configuration

Inherits:
Spree::Preferences::Configuration
  • Object
show all
Includes:
Spree::Core::EnvironmentExtension
Defined in:
lib/solidus_promotions/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#advertiser_classClass

Allows providing a different promotion advertiser.

Returns:

  • (Class)

    an object that conforms to the API of the standard promotion advertiser class Spree::NullPromotionAdvertiser.

See Also:

  • Spree::NullPromotionAdvertiser


21
# File 'lib/solidus_promotions/configuration.rb', line 21

class_name_attribute :advertiser_class, default: "SolidusPromotions::PromotionAdvertiser"

#promotions_per_pageInteger

Returns Promotions to show per-page in the admin (default: 25).

Returns:

  • (Integer)

    Promotions to show per-page in the admin (default: 25)



95
# File 'lib/solidus_promotions/configuration.rb', line 95

preference :promotions_per_page, :integer, default: 25

Instance Method Details

#use_new_admin?Boolean

Returns:

  • (Boolean)


109
110
111
# File 'lib/solidus_promotions/configuration.rb', line 109

def use_new_admin?
  SolidusSupport.admin_available? && preferred_use_new_admin
end