state-machines / state_machines-activemodel

StateMachines ActiveModel Integration
MIT License
33 stars 33 forks source link

Use ActiveSuport.on_load to set I18n load path #13

Closed jbourassa closed 5 years ago

jbourassa commented 5 years ago

Calling I18n.reload! causes the next call to I18n to load all the locale data, which can be quite slow when there are a lot of translations in your project. By setting the path when I18n loads, we can avoid reloading invalidating the cache w/ I18n.reload!.

cc @rafaelfranca

jbourassa commented 5 years ago

The build fails because the I18n version from gemfiles/active_model_5.2.gemfile isn't compatible w/ ruby 2.2.9.

Gem::InstallError: i18n requires Ruby version >= 2.3.0.