Module: EffectiveEvents

Includes:
EffectiveGem
Defined in:
lib/effective_events.rb,
lib/effective_events/engine.rb,
lib/effective_events/version.rb,
lib/generators/effective_events/install_generator.rb

Defined Under Namespace

Modules: Generators Classes: Engine

Constant Summary collapse

VERSION =
'0.19.0'.freeze

Class Method Summary collapse

Class Method Details

.categoriesObject



27
28
29
# File 'lib/effective_events.rb', line 27

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

.config_keysObject



7
8
9
10
11
12
13
14
15
# File 'lib/effective_events.rb', line 7

def self.config_keys
  [
    :events_table_name, :event_registrants_table_name, :event_tickets_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, :event_registrant_required_fields,
    :event_registration_class_name
  ]
end

.delayed?Boolean

If we can create delayed payment events at all

Returns:

  • (Boolean)


36
37
38
# File 'lib/effective_events.rb', line 36

def self.delayed?
  !!EffectiveOrders.try(:delayed?) 
end

.event_registrant_required_fieldsObject



31
32
33
# File 'lib/effective_events.rb', line 31

def self.event_registrant_required_fields
  (Array(config[:event_registrant_required_fields]) - [nil, false, '']).map(&:to_sym)
end

.EventRegistrationObject



19
20
21
# File 'lib/effective_events.rb', line 19

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

.mailer_classObject



23
24
25
# File 'lib/effective_events.rb', line 23

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