app/models/plan.rb
def request_feedback(user)
    Plan.transaction do
      self.feedback_requested = true
      return false unless save!

      # Send an email to the org-admin contact
      if user.org.contact_email.present?
        contact = User.new(email: user.org.contact_email,
                           firstname: user.org.contact_name)
        UserMailer.feedback_notification(contact, self, user).deliver_now
      end
      true
    rescue StandardError => e
      Rails.logger.error e
      false
    end
  end
##
# Sets up the plan for feedback:
#  emails confirmation messages to owners
#  emails org admins and org contact
#  adds org admins to plan with the 'reviewer' Role
Sets up the plan for feedback:
emails confirmation messages to owners
emails org admins and org contact
adds org admins to plan with the 'reviewer' Role
Sets up the plan for feedback : emails confirmation messages to owners emails org admins and org contact adds org admins to plan with the ' reviewer ' Role
def request_feedback(user)
    Plan.transaction do
      self.feedback_requested = true
      return false unless save!
      if user.org.contact_email.present?
        contact = User.new(email: user.org.contact_email,
                           firstname: user.org.contact_name)
        UserMailer.feedback_notification(contact, self, user).deliver_now
      end
      true
    rescue StandardError => e
      Rails.logger.error e
      false
    end
  end
def request_feedback ( user ) Plan . transaction do self . feedback_requested = true return false unless save! if user . org . contact_email . present? contact = User . new ( email : user . org . contact_email , firstname : user . org . contact_name ) UserMailer . feedback_notification ( contact , self , user ) . deliver_now end true rescue StandardError => e Rails . logger . error e false end end
Sets up the plan for feedback:
emails confirmation messages to owners
emails org admins and org contact
adds org admins to plan with the 'reviewer' Role
Sets up the plan for feedback : emails confirmation messages to owners emails org admins and org contact adds org admins to plan with the ' reviewer ' Role
# Send an email to the org-admin contact
user