You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.
tl;dr; if you switch locales the cache is the wrong locale.
I18n.enforce_available_locales=falsedato.available_locales.eachdo |locale|
directory"data/dato/#{locale}"doI18n.with_locale(locale)dodato.send(:build_cache!)# without this the cache will contain data for the wrong locale ;-/create_data_file"site.yml",:yaml,dato.site.to_hashdato.item_types.eachdo |item_type|
create_data_file"#{item_type.api_key}.yml",:yaml,dato.items_of_type(item_type).map(&:to_hash)endendendend
The text was updated successfully, but these errors were encountered:
The same commit also fixes the situation where an Item Type has a field called slug. In this case, the gem returns the directly the field value, and does not generate a slug on its own.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
tl;dr; if you switch locales the cache is the wrong locale.
The text was updated successfully, but these errors were encountered: