codegram / date_validator

A simple, ORM agnostic, Ruby >=2.2 compatible date validator for Rails, based on ActiveModel.
http://thoughts.codegram.com/date-validation-with-rails-3
MIT License
495 stars 82 forks source link

Initialize Rails engine with initializer (fix for locales issue) #68

Closed greyblake closed 8 years ago

greyblake commented 8 years ago
files = Dir[Pathname.new(File.dirname(__FILE__)).join('../..', 'locales', '*.yml')]
config.i18n.load_path += files

should execute after Rails initializes itself. Otherise Rails overwrites config.i18n.load_path and date_validator locale files are lost.

This PR fixes this issue

maxprokopiev commented 8 years ago

:+1:

greyblake commented 8 years ago

@oriolgual Thanks for merging this! Could you please also release a new patch version? =)