app/models/plan.rb
##
# Finalizes the feedback for the plan: Emails confirmation messages to owners
# sets flag on plans.feedback_requested to false removes org admins from the
# 'reviewer' Role for the Plan.
Finalizes the feedback for the plan: Emails confirmation messages to owners
sets flag on plans.feedback_requested to false removes org admins from the
'reviewer' Role for the Plan.
Finalizes the feedback for the plan : Emails confirmation messages to owners sets flag on plans . feedback_requested to false removes org admins from the ' reviewer ' Role for the Plan .
def complete_feedback(org_admin)
    Plan.transaction do
      self.feedback_requested = false
      return false unless save!
      deliver_if(recipients: owner_and_coowners,
                 key: "users.feedback_provided") do |r|
        UserMailer.feedback_complete(
          r,
          self,
          org_admin
        ).deliver_now
      end
      true
    rescue StandardError => e
      Rails.logger.error e
      false
    end
  end
def complete_feedback ( org_admin ) Plan . transaction do self . feedback_requested = false return false unless save! deliver_if ( recipients : owner_and_coowners , key : "users.feedback_provided" ) do | r | UserMailer . feedback_complete ( r , self , org_admin ) . deliver_now end true rescue StandardError => e Rails . logger . error e false end end
Finalizes the feedback for the plan: Emails confirmation messages to owners
sets flag on plans.feedback_requested to false removes org admins from the
'reviewer' Role for the Plan.
Finalizes the feedback for the plan : Emails confirmation messages to owners sets flag on plans . feedback_requested to false removes org admins from the ' reviewer ' Role for the Plan .
# Send an email confirmation to the owners and co-owners
org_admin