Class: EventParticipant
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- EventParticipant
- Includes:
- Toggleable
- Defined in:
- app/models/event_participant.rb
Constant Summary collapse
- PER_PAGE =
20
- NAME_LIMIT =
100
- EMAIL_LIMIT =
250
- PHONE_LIMIT =
50
- COMMENT_LIMIT =
10000
- NOTICE_LIMIT =
250
- COMPANY_LIMIT =
250
- METRIC_CREATED =
'events.participants.created.hit'
Class Method Summary collapse
- .creation_parameters ⇒ Object
- .entity_parameters ⇒ Object
- .page_for_administration(page = 1, filter = {}) ⇒ Object
Instance Method Summary collapse
Class Method Details
.creation_parameters ⇒ Object
45 46 47 |
# File 'app/models/event_participant.rb', line 45 def self.creation_parameters entity_parameters - %i(notice) + %i(event_id) end |
.entity_parameters ⇒ Object
41 42 43 |
# File 'app/models/event_participant.rb', line 41 def self.entity_parameters %i(name surname email phone comment notice company) end |
.page_for_administration(page = 1, filter = {}) ⇒ Object
37 38 39 |
# File 'app/models/event_participant.rb', line 37 def self.page_for_administration(page = 1, filter = {}) filtered(filter).recent.page(page).per(PER_PAGE) end |
Instance Method Details
#full_name ⇒ Object
49 50 51 |
# File 'app/models/event_participant.rb', line 49 def full_name "#{surname} #{name}".strip end |