Sha256: 725b64db7d63f2f1b2ba2e38079a29e2b93f4b7fc05ef035dd4e1ec4a26fd52c

Contents?: true

Size: 1.4 KB

Versions: 8

Compression:

Stored size: 1.4 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, :send_confirmation_email,
      :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

  def self.send_confirmation_email?
    send_confirmation_email == true
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
effective_events-2.29.2 lib/effective_events.rb
effective_events-2.29.1 lib/effective_events.rb
effective_events-2.29.0 lib/effective_events.rb
effective_events-2.28.3 lib/effective_events.rb
effective_events-2.28.2 lib/effective_events.rb
effective_events-2.28.1 lib/effective_events.rb
effective_events-2.28.0 lib/effective_events.rb
effective_events-2.27.0 lib/effective_events.rb