validates_timeliness v3.0.0 Release Notes
Release Date: 2010-10-18 // over 13 years ago-
- 🚅 Rails 3 and ActiveModel compatibility
- Uses ActiveModel::EachValidator as validator base class.
- 🔧 Configuration settings stored in ValidatesTimeliness module only. ValidatesTimeliness.setup block to configure.
- 📜 Parser extracted to the Timeliness gem http://github.com/adzap/timeliness
- 👀 Parser is disabled by default. See initializer for enabling it.
- 🚚 Removed RSpec matcher. Encouraged poor specs by copy-pasting from spec to model, or worse, the other way round.
- 📜 Method override for parsing and before type cast values is on validated attributes only. Old version handled all date/datetime columns, validates or not. Too intrusive.
- Add validation helpers to classes using extend_orms config setting. e.g. conf.extend_orms = [ :active_record ]
- Changed :between option so it is split into :on_or_after and :on_or_before option values. The error message for either failing check will be used instead of a between error message.
- Provides :timeliness option key for validates class method. Be sure to pass :type option as well e.g. :type => :date.
- Allows validation methods to be called on record instances as per ActiveModel API.
- Performs parsing (optional) and raw value caching (before_type_cast) on validated attributes only. It used to be all date, time and datetime attributes.