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

Error /app/app/models/translation.rb:1:in `<top (required)>': superclass mismatch for class Translation (TypeError) #92

Closed
eduardorph opened this issue Mar 19, 2018 · 3 comments

Comments

@eduardorph
Copy link

I followed this article to implement translations through a admin page

This works great in my localhost, but when i push to heroku this message appears:

"/app/app/models/translation.rb:1:in `': superclass mismatch for class Translation (TypeError)"

My MODEL TRanslation:

class Translation < ApplicationRecord
end

Can anyone help me, i don't have any idea to solve this

@timfjord
Copy link
Collaborator

Why do you need your own Translation model?
There is Translation model defined in this gem - https://github.com/svenfuchs/i18n-active_record/blob/master/lib/i18n/backend/active_record/translation.rb
So you can use I18n::Backend::ActiveRecord::Translation to manage translations

@Mehonoshin
Copy link

@eduardorph you should either to remove Translation = I18n::Backend::ActiveRecord::Translation from initializers, or get rid of Translation model.

@timfjord
Copy link
Collaborator

It looks like the issue has been resolved

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

3 participants