Closed zensible closed 8 years ago
I totally dropped the ball here and for some reason thought it was for mailing people lessons. This is actually so people can send links in. Sorry!
No worries! Yeah just a simple contact form.
Is there anything I can do to get this ready to merge, @andyras? Should I link /contact in the footer or some such?
Nothing special, I had just been lax about dealing with a couple of conflicts. Merged!
Adds a contact form at /contact. Results of form are emailed to the address in contact_controller.rb#create -> :to, and saved to the database in the 'contacts' table.
FYI: needs some styling (I'm terrible at styling but can work on it if no one else is up to it).
Also: since we have more than one page now, moves the search filters into index.html, since we don't need it on /contact.
Requires a free account at sendgrid.com, the username/password should go into these environment variables in Heroku:
SENDGRID_USERNAME SENDGRID_PASSWORD
This env var is the destination address:
CONTACT_TO
If all 3 are not set, we warn the user at server startup and log the emails rather than send them.