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 =
'3.3.7'.freeze
Class Method Summary collapse
- .categories ⇒ Object
- .code_of_conduct_effective_page ⇒ Object
- .code_of_conduct_effective_page! ⇒ Object
- .code_of_conduct_enabled? ⇒ Boolean
- .config_keys ⇒ Object
-
.delayed? ⇒ Boolean
If we can create delayed payment events at all.
- .EventRegistration ⇒ Object
- .mailer_class ⇒ Object
- .organization_enabled? ⇒ Boolean
- .validate_one_ticket_per_event? ⇒ Boolean
Class Method Details
.categories ⇒ Object
30 31 32 |
# File 'lib/effective_events.rb', line 30 def self.categories Array(config[:categories]) - [nil, false, ''] end |
.code_of_conduct_effective_page ⇒ Object
43 44 45 46 |
# File 'lib/effective_events.rb', line 43 def self.code_of_conduct_effective_page return unless defined?(Effective::Page) Effective::Page.where(slug: code_of_conduct_slug).first end |
.code_of_conduct_effective_page! ⇒ Object
48 49 50 51 52 53 |
# File 'lib/effective_events.rb', line 48 def self.code_of_conduct_effective_page! page = code_of_conduct_effective_page() raise("The Effective::Page for slug \"#{code_of_conduct_slug}\" does not exist. Please create it.") if page.blank? page end |
.code_of_conduct_enabled? ⇒ Boolean
39 40 41 |
# File 'lib/effective_events.rb', line 39 def self.code_of_conduct_enabled? code_of_conduct_enabled == true end |
.config_keys ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/effective_events.rb', line 7 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, :validate_one_ticket_per_event, :code_of_conduct_enabled, :code_of_conduct_slug, :disable_delayed, :event_registration_class_name ] end |
.delayed? ⇒ Boolean
If we can create delayed payment events at all
60 61 62 63 |
# File 'lib/effective_events.rb', line 60 def self.delayed? return false if disable_delayed !!EffectiveOrders.try(:delayed?) end |
.EventRegistration ⇒ Object
22 23 24 |
# File 'lib/effective_events.rb', line 22 def self.EventRegistration event_registration_class_name&.constantize || Effective::EventRegistration end |
.mailer_class ⇒ Object
26 27 28 |
# File 'lib/effective_events.rb', line 26 def self.mailer_class mailer&.constantize || Effective::EventsMailer end |
.organization_enabled? ⇒ Boolean
34 35 36 37 |
# File 'lib/effective_events.rb', line 34 def self.organization_enabled? raise('missing the effective_memberships gem') if organization_enabled && !defined?(EffectiveMemberships) organization_enabled == true end |
.validate_one_ticket_per_event? ⇒ Boolean
55 56 57 |
# File 'lib/effective_events.rb', line 55 def self.validate_one_ticket_per_event? validate_one_ticket_per_event == true end |