Class: Decidim::Conferences::ConferenceInvite
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- Decidim::Conferences::ConferenceInvite
- Includes:
- DownloadYourData, Loggable, Traceable
- Defined in:
- app/models/decidim/conferences/conference_invite.rb
Overview
The data store for an Invite in the Decidim::Conferences component.
Class Method Summary collapse
Instance Method Summary collapse
- #accept! ⇒ Object
- #reject! ⇒ Object (also: #decline!)
Class Method Details
.export_serializer ⇒ Object
17 18 19 |
# File 'app/models/decidim/conferences/conference_invite.rb', line 17 def self.export_serializer Decidim::Conferences::DownloadYourDataConferenceInviteSerializer end |
.log_presenter_class_for(_log) ⇒ Object
21 22 23 |
# File 'app/models/decidim/conferences/conference_invite.rb', line 21 def self.log_presenter_class_for(_log) Decidim::Conferences::AdminLog::InvitePresenter end |
.user_collection(user) ⇒ Object
25 26 27 |
# File 'app/models/decidim/conferences/conference_invite.rb', line 25 def self.user_collection(user) where(decidim_user_id: user.id) end |
Instance Method Details
#accept! ⇒ Object
29 30 31 |
# File 'app/models/decidim/conferences/conference_invite.rb', line 29 def accept! update!(accepted_at: Time.current, rejected_at: nil) end |
#reject! ⇒ Object Also known as: decline!
33 34 35 |
# File 'app/models/decidim/conferences/conference_invite.rb', line 33 def reject! update!(rejected_at: Time.current, accepted_at: nil) end |