spree/spree — pull request #5165 by adammathys (2014-08-07 22:32:44+00:00)
Title: More user friendly promotion rule errors.

Modelled after ActiveRecord's validation errors, when `eligible?` is run the rule can populate `eligibility_errors` with any specific error messages it would like. The errors are then bubbled up to the promotion and then the promotion handler.

For example, if a store had a promotion granting user's 10% off their first order and a user attempts to add the promotion to their cart on a second order they will see:

![image](https://cloud.githubusercontent.com/assets/876067/3850215/59bc9596-1e82-11e4-9c23-a2b877cd9a6d.png)

Instead of the less helpful:

![image](https://cloud.githubusercontent.com/assets/876067/3850207/3cb9e44e-1e82-11e4-83bf-cc37252e95e7.png)

I've added reasonable error messages for most of the rules. The code will also fall back to the old error message if `eligibility_errors` is not populated.