Class: Decidim::Meetings::Invite
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Decidim::Meetings::Invite
- Includes:
- DownloadYourData, Loggable, Traceable
- Defined in:
- app/models/decidim/meetings/invite.rb
Overview
The data store for an Invite in the Decidim::Meetings component.
Class Method Summary collapse
Instance Method Summary collapse
- #accept! ⇒ Object
- #reject! ⇒ Object (also: #decline!)
Class Method Details
.export_serializer ⇒ Object
16 17 18 |
# File 'app/models/decidim/meetings/invite.rb', line 16 def self.export_serializer Decidim::Meetings::DownloadYourDataInviteSerializer end |
.log_presenter_class_for(_log) ⇒ Object
20 21 22 |
# File 'app/models/decidim/meetings/invite.rb', line 20 def self.log_presenter_class_for(_log) Decidim::Meetings::AdminLog::InvitePresenter end |
.user_collection(user) ⇒ Object
24 25 26 |
# File 'app/models/decidim/meetings/invite.rb', line 24 def self.user_collection(user) where(decidim_user_id: user.id) end |
Instance Method Details
#accept! ⇒ Object
28 29 30 |
# File 'app/models/decidim/meetings/invite.rb', line 28 def accept! update!(accepted_at: Time.current, rejected_at: nil) end |
#reject! ⇒ Object Also known as: decline!
32 33 34 |
# File 'app/models/decidim/meetings/invite.rb', line 32 def reject! update!(rejected_at: Time.current, accepted_at: nil) end |