DynamoMTL/spree-hominid — pull request #5 by johanb (2013-05-09 11:10:46+00:00)
Title: Accountless subscriptions

This adds a "Subscriber" model as suggested in #2. Since I didn't own the issue I apparently can't attach the PR directly to that issue.

It's not ready to be merged yet. Intended to allow discussion about the implementation:

Some choices I've made which could be debated:

* Use a databaseless model for subscribers, since we wouldn't be able to keep track of the users anyway, it doesn't make sense to store them in both locations (Mailchimp & Spree) I think. Therefor I've otped for a simple model

* My main goal is to have an e-mail field with a submit button later on, therefor an e-mail adress is always required. However, I've allowed the use case of more extensive forms with other merge tags to be possible. If you were to create a form with say a "firstname", "lastname", "email", it will define methods for those and if they correspond to merge tags, they will be send in to mailchimp. The way this is currently implemented could probably use a cleanup.

* Currently it doesn't matter which attribute has changed, as long as 1 attribute has changed all merge tags get reposted to the server. Is this wise ?

TODO:

* Add a controller for accepting the form input, sanatizing it, and passing it to mailchimp
* Add an example form