Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable fallback on class level #13

Open
MSchmidt opened this issue Sep 24, 2018 · 0 comments
Open

Disable fallback on class level #13

MSchmidt opened this issue Sep 24, 2018 · 0 comments

Comments

@MSchmidt
Copy link

We can already disable fallbacks on instance level:

I18n.locale = :en
post.title_nl # => This database rocks!

post.disable_fallback do
  post.title_nl # => nil
end

But especially for the mentioned use case of admin panels, wouldn't it be better to disable everything on class level? This way we could disable fallbacks for everything in some kind of AdminController.

JSONTranslate.disable_fallback do
  # ...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant