AgileVentures/osra — pull request #17 by NikitaAvvakumov (2014-08-26 19:04:44+00:00)
Title: Improve validation of dates not being in the future

Pivotal chore *Fix lib/date_validator*: https://www.pivotaltracker.com/story/show/77492944, which arose out of the discussion on PR #13.

- rename `partnership_start_date` & `sponsorship_start_date` to `start_date` in models and corresponding specs. With the final validator implementation, this is no longer required and the attribute names can be restored to original
- create new validator `DateNotInFutureValidator < ActiveModel::EachValidator` in app/validators/date_not_in_future_validator.rb
- create spec/validators/date_not_in_future_validator_spec.rb which tests that the validator:
- passes valid dates
- fails invalid (future) dates
- returns default error message if a custom message is not provided
- returns the custom error message if provided
- replace original date validations in Partner & Sponsor models with the new
- delete lib/date_validator.rb and remove references to it in Partner & Sponsor models