Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

email delivery on submitting new question #37

Merged
merged 4 commits into from
Aug 6, 2013
Merged

email delivery on submitting new question #37

merged 4 commits into from
Aug 6, 2013

Conversation

derekeder
Copy link
Contributor

When a user submits a new question, an email is sent to them confirming their submission with links to share on social media. Example:

<!DOCTYPE html>
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
  </head>
  <body>
    <h1>Thank you for posting your question to AskThem, Derek</h1>

    <dl>
      <dt>Title</dt>
      <dd>This is my important question!</dd>

      <dt>Topic</dt>
      <dd>Arts and Humanities</dd>

      <dt>To</dt>
      <dd>
        <strong><a href="http://localhost:3000/il/people/ILL000065">Maria Antonia Berrios</a></strong>
        <span>(Representative, District 39, Democratic)</span>
      </dd>

      <dt>Body</dt>
      <dd>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</dd>
    </dl>

    <p>
      <a href="http://localhost:3000/il/questions/52015e6a8e573493fb000002">Here's a permalink to your question</a>, which you can share over email and social media.
    </p>
    <p>
      Remember to circulate your question to reach the signature threshold, and we'll help you push for a public response.
    </p>
    <p>
      For more info about how to gather support for your question, <a href="#">please visit our FAQ</a>.
    </p>
    <p>
        Thank you,
        The AskThem Team
    </p>
  </body>
</html>

Content needs review by @davidmooreppf.

@walter, is this spec for the email sufficient?

Closes #19

read_attribute(:chambers)[chamber].try{|chamber| chamber['title']}
unless chamber.nil?
read_attribute(:chambers)[chamber].try{|chamber| chamber['title']}
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@walter added this because spec was failing when trying to populate person_attributes for FactoryGirl person. May want to revert this and flesh out the test object.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling e76ba21 on datamade:master into 47c7454 on opengovernment:master.

@walter
Copy link
Contributor

walter commented Aug 6, 2013

@derekeder I'm cool with that as our baseline spec.

@walter walter merged commit e76ba21 into opengovernment:master Aug 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

code for follow-up emails after Question is published
3 participants