Class: ExternalReleaseEvent
- Inherits:
-
Event
- Object
- ActiveRecord::Base
- ApplicationRecord
- Event
- ExternalReleaseEvent
- Defined in:
- app/models/external_release_event.rb
Instance Attribute Summary collapse
-
#send_email ⇒ Object
Returns the value of attribute send_email.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Event
Methods included from Event::RequestDescriptorUpdateEvent
included, #library_creation_descriptor?, #pass_or_fail_event?, #set_request_metadata, #update_metadata_for_request
Methods included from Uuid::Uuidable
included, #unsaved_uuid!, #uuid
Methods inherited from ApplicationRecord
alias_association, convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!
Methods included from Squishify
Instance Attribute Details
#send_email ⇒ Object
Returns the value of attribute send_email.
6 7 8 |
# File 'app/models/external_release_event.rb', line 6 def send_email @send_email end |
Class Method Details
.create_for_asset!(asset, sendmail = false) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'app/models/external_release_event.rb', line 8 def self.create_for_asset!(asset, sendmail = false) create!( eventful: asset, message: "Data to be released externally set #{asset.external_release}", created_by: '', family: 'update', of_interest_to: 'administrators', send_email: sendmail ) end |
Instance Method Details
#physically_send_email ⇒ Object
23 24 25 26 27 28 29 |
# File 'app/models/external_release_event.rb', line 23 def physically_send_email studies = eventful.studies users = studies.reduce([]) { |users, study| users.concat(study.mailing_list_of_managers.compact_blank) } return false if users.empty? EventfulMailer.confirm_external_release_event(users.uniq, eventful, , content, 'No Milestone').deliver_now end |
#set_qc_state ⇒ Object
19 20 21 |
# File 'app/models/external_release_event.rb', line 19 def set_qc_state # This method should be empty! end |