# Preview all emails at http://localhost:3000/rails/mailers/archived/petition_mailer
module Archived
class PetitionMailerPreview < ActionMailer::Preview - Archived::PetitionMailerPreview has no descriptive comment
def email_signer - Archived::PetitionMailerPreview#email_signer doesn't depend on instance state (maybe move it to another class?)
email = Archived::Petition::Email.last
petition = email.petition
signature = petition.signatures.validated.last
PetitionMailer.email_signer(petition, signature, email)
end
def email_creator - Archived::PetitionMailerPreview#email_creator doesn't depend on instance state (maybe move it to another class?)
email = Archived::Petition::Email.last
petition = email.petition
signature = petition.creator
PetitionMailer.email_creator(petition, signature, email)
end
def notify_signer_of_threshold_response -
- Archived::PetitionMailerPreview#notify_signer_of_threshold_response doesn't depend on instance state (maybe move it to another class?)
petition = Archived::Petition.with_response.last
signature = petition.signatures.validated.last
Archived::PetitionMailer.notify_signer_of_threshold_response(petition, signature)
end
def notify_creator_of_threshold_response - Archived::PetitionMailerPreview#notify_creator_of_threshold_response doesn't depend on instance state (maybe move it to another class?)
petition = Archived::Petition.with_response.last
signature = petition.creator
Archived::PetitionMailer.notify_creator_of_threshold_response(petition, signature)
end
def notify_signer_of_debate_scheduled -
- Archived::PetitionMailerPreview#notify_signer_of_debate_scheduled doesn't depend on instance state (maybe move it to another class?)
petition = Archived::Petition.debated.last
signature = petition.signatures.validated.last
Archived::PetitionMailer.notify_signer_of_debate_scheduled(petition, signature)
end
def notify_creator_of_debate_scheduled - Archived::PetitionMailerPreview#notify_creator_of_debate_scheduled doesn't depend on instance state (maybe move it to another class?)
petition = Archived::Petition.debated.last
signature = petition.creator
Archived::PetitionMailer.notify_creator_of_debate_scheduled(petition, signature)
end
def notify_signer_of_positive_debate_outcome -
- Archived::PetitionMailerPreview#notify_signer_of_positive_debate_outcome doesn't depend on instance state (maybe move it to another class?)
petition = Archived::Petition.debated.last
signature = petition.signatures.validated.last
Archived::PetitionMailer.notify_signer_of_debate_outcome(petition, signature)
end
def notify_creator_of_positive_debate_outcome - Archived::PetitionMailerPreview#notify_creator_of_positive_debate_outcome doesn't depend on instance state (maybe move it to another class?)
petition = Archived::Petition.debated.last
signature = petition.creator
Archived::PetitionMailer.notify_creator_of_debate_outcome(petition, signature)
end
def notify_signer_of_negative_debate_outcome -
- Archived::PetitionMailerPreview#notify_signer_of_negative_debate_outcome doesn't depend on instance state (maybe move it to another class?)
petition = Archived::Petition.not_debated.last
signature = petition.signatures.validated.last
Archived::PetitionMailer.notify_signer_of_debate_outcome(petition, signature)
end
def notify_creator_of_negative_debate_outcome - Archived::PetitionMailerPreview#notify_creator_of_negative_debate_outcome doesn't depend on instance state (maybe move it to another class?)
petition = Archived::Petition.not_debated.last
signature = petition.creator
Archived::PetitionMailer.notify_creator_of_debate_outcome(petition, signature)
end
end
end