Class: Decidim::Meetings::Admin::MarkAsAttendee
- Inherits:
-
Command
- Object
- Command
- Decidim::Meetings::Admin::MarkAsAttendee
- Defined in:
- app/commands/decidim/meetings/admin/mark_as_attendee.rb
Overview
This command is executed when the user marks a registration as attendee from the admin panel.
Instance Attribute Summary collapse
-
#registration ⇒ Object
readonly
Returns the value of attribute registration.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(registration) ⇒ MarkAsAttendee
constructor
A new instance of MarkAsAttendee.
Constructor Details
#initialize(registration) ⇒ MarkAsAttendee
Returns a new instance of MarkAsAttendee.
9 10 11 |
# File 'app/commands/decidim/meetings/admin/mark_as_attendee.rb', line 9 def initialize(registration) @registration = registration end |
Instance Attribute Details
#registration ⇒ Object (readonly)
Returns the value of attribute registration.
22 23 24 |
# File 'app/commands/decidim/meetings/admin/mark_as_attendee.rb', line 22 def registration @registration end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/commands/decidim/meetings/admin/mark_as_attendee.rb', line 13 def call return broadcast(:invalid) if registration.validated? mark_attendee send_notification broadcast(:ok) end |