Class: Decidim::Meetings::Admin::MarkAsAttendee
- Defined in:
- decidim-meetings/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.
Methods inherited from Command
call, #evaluate, #method_missing, #respond_to_missing?, #transaction, #with_events
Constructor Details
#initialize(registration) ⇒ MarkAsAttendee
Returns a new instance of MarkAsAttendee.
9 10 11 |
# File 'decidim-meetings/app/commands/decidim/meetings/admin/mark_as_attendee.rb', line 9 def initialize(registration) @registration = registration end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Decidim::Command
Instance Attribute Details
#registration ⇒ Object (readonly)
Returns the value of attribute registration.
22 23 24 |
# File 'decidim-meetings/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 'decidim-meetings/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 |