Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Check for Refinery::I18n's presence to fix #1533. #1534
My proposal would be to simply change
def invalidate_cached_urls # other code ... ((Refinery.i18n_enabled? && Refinery::I18n.frontend_locales) || [::I18n.locale]).each do |locale| Rails.cache.delete(page.url_cache_key(locale)) Rails.cache.delete(page.path_cache_key(locale)) end end end
At this point in time, IMO, we should not allow the user to remove I18n. It's not a huge dependency, and it'll substantially simplify our codebase + support just to be able to assume it exists.
I'm sure there is one, but I can't think of a good reason why we wouldn't make it part of the package.
If the reason is just not wanting to add more things to core, I understand, however I disagree. There are tons of references to Refinery::I18n in core, and I think it's silly to keep it separate.
Also, I think Refinery's ease of translation is one of its killer features and should be celebrated rather than kept at arm's length.