Sha256: 59ec944738a641576ced282dcce9b7af8fc130e03bbdafe1973c60e2e5f43a50

Contents?: true

Size: 1.29 KB

Versions: 20

Compression:

Stored size: 1.29 KB

Contents

require 'effective_resources'
require 'effective_events/engine'
require 'effective_events/version'

module EffectiveEvents

  def self.config_keys
    [
      :events_table_name, :event_registrants_table_name, :event_tickets_table_name, :event_ticket_selections_table_name,
      :event_registrations_table_name, :event_products_table_name, :event_addons_table_name, :event_notifications_table_name,
      :mailer, :parent_mailer, :deliver_method, :mailer_layout, :mailer_sender, :mailer_admin, :mailer_subject,
      :layout, :per_page, :use_effective_roles, :categories, :events_hint_text,
      :organization_enabled, :create_users, :company_or_organization_required,
      :event_registration_class_name
    ]
  end

  include EffectiveGem

  def self.EventRegistration
    event_registration_class_name&.constantize || Effective::EventRegistration
  end

  def self.mailer_class
    mailer&.constantize || Effective::EventsMailer
  end

  def self.categories
    Array(config[:categories]) - [nil, false, '']
  end

  def self.organization_enabled?
    raise('missing the effective_memberships gem') if organization_enabled && !defined?(EffectiveMemberships)
    organization_enabled == true
  end

  # If we can create delayed payment events at all
  def self.delayed?
    !!EffectiveOrders.try(:delayed?) 
  end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
effective_events-2.26.0 lib/effective_events.rb
effective_events-2.25.1 lib/effective_events.rb
effective_events-2.25.0 lib/effective_events.rb
effective_events-0.24.0 lib/effective_events.rb
effective_events-0.23.1 lib/effective_events.rb
effective_events-0.23.0 lib/effective_events.rb
effective_events-0.22.2 lib/effective_events.rb
effective_events-0.22.1 lib/effective_events.rb
effective_events-0.22.0 lib/effective_events.rb
effective_events-0.21.3 lib/effective_events.rb
effective_events-0.21.2 lib/effective_events.rb
effective_events-0.21.1 lib/effective_events.rb
effective_events-0.21.0 lib/effective_events.rb
effective_events-0.20.6 lib/effective_events.rb
effective_events-0.20.5 lib/effective_events.rb
effective_events-0.20.4 lib/effective_events.rb
effective_events-0.20.3 lib/effective_events.rb
effective_events-0.20.2 lib/effective_events.rb
effective_events-0.20.1 lib/effective_events.rb
effective_events-0.20.0 lib/effective_events.rb