validates_timeliness

https://github.com/adzap/validates_timeliness

Ruby

Date and time validation plugin for ActiveModel and Rails. Supports multiple ORMs and allows custom date/time formats.

ValidatesTimeliness::ORM::ActiveRecord::ClassMethods#generated_timeliness_methods

Override to overwrite methods in ActiveRecord attribute method module because in AR 4+
there is curious code which calls the method directly from the generated methods module
via bind inside method_missing. This means our method in the formerly custom timeliness
methods module was never reached.

Source | Google | Stack overflow

Edit

git clone [email protected]:adzap/validates_timeliness.git

cd validates_timeliness

open lib/validates_timeliness/orm/active_record.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-ValidatesTimeliness--ORM--ActiveRecord--ClassMethods-generated_timeliness_methods-for-pr


# Commit to git

git add lib/validates_timeliness/orm/active_record.rbgit commit -m "better docs for ValidatesTimeliness::ORM::ActiveRecord::ClassMethods#generated_timeliness_methods"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-ValidatesTimeliness--ORM--ActiveRecord--ClassMethods-generated_timeliness_methods-for-pr

hub pull-request


# Celebrate!