This is a solution to the challenge presented by Apartmentlist which is listed here: https://gist.github.com/sarahwiemero/358018196ef6b7e5fec68e103bb25a08 To run this application:
- Download the repo and unzip it.
- Browse to the directory where you unzipped it and run "bundle install"
- Start the server by running "rails server"
- Take your browser to http://localhost:3000
You can then view the emails by goin to the "View Emails" link. This will list all of the emails which have been created. You can view the emails by clicking on the "View Email" link next to each record. This will show the email which will be sent to the user. This includes special formatting to comply with HTML clients and to be easily viewed on mobile devices (where over 50% of emails are viewed today).
Emails have a link to each star rating that includes the token and the rating which will then be logged on the email landing page.
Restaurants can be viewed under the "Restaurants" link in the nav along with their cumulative rating. It shows a rating of 0 if there haven't been any votes on it yet.
This time took a little longer than I expected so I need to stop short of where I wanted to be. But here is where I would take it next:
- Add pagination onto the list of restaurants and emails
- Improve the overall UI
- Add authentication
- Enhance reporting so that the rating of a restaurant can be seperated by day it was visited. E.g. emails sent on Friday for the "finance" team would have one rating. Emails sent on Monday with the "engineering" team would have another rating.
- Add rspec tests
- Improve the UI of the email and landing page.
- Add a "sent_at" column to each correspondence and write the script that actually sends the emails to the users and logs the email as sent.