Skip to content

Rails 3.2 errors ? #35

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

Open
antonioturdo opened this issue Apr 17, 2012 · 6 comments
Open

Rails 3.2 errors ? #35

antonioturdo opened this issue Apr 17, 2012 · 6 comments

Comments

@antonioturdo
Copy link

I am trying to use Tr8n with rails 3.2.2. I have my own authentication system and enabled use of User model. I get two different errors:

  • On language switching an "ActiveModel::MassAssignmentSecurity::Error in Tr8n::LanguageController#switch" error is returned with "Can't mass-assign protected attributes: updated_at" as an explanation
  • On translation update current user is logged out; the ajax request return our view to log in.

These errors can be related to the use of rails 3.2.2? Any suggestions on how to solve?

@berk
Copy link
Owner

berk commented May 3, 2012

I am working on the solution for both of the issues you've mentioned. Those should be fixed soon.

@iakona
Copy link

iakona commented Jun 6, 2012

I had the same problem, but I did find a fix to the first one.

In the gem file for tr8n, you want to go to the edit the file app/models/language_user.rb and change the line near the bottom that says lu.set_attr or something like that to lu.touch.

Another fix is in the file app/models/language_metric.rb there is a typo "total_ley_key" should be changed to key.

@whitehat101
Copy link

These bugs are making my test use of tr8n less enjoyable. These bugs are present in my 3.2.7 app, and in the example demo app: https://github.com/tr8n/tr8n_rails_3.2.3 it wouldn't work for me.

At first look, master (973fb52) seems to work with 3.2.7

@silviorelli
Copy link

I still have this error reported by @zeusi83 (on Rails 3.2.13), I'm trying to develop a fix but I'm unable to load the gem source for development.

Can you please help me, telling how to load the "extracted" gem for development?

I tried:

  • loading the /lib dir with config.autoload_paths but it seems not to include the view helpers so both tr8n_language_selector_tag tr8n_language_strip_tag throws errors
  • loading the gem in Gemfile with gem 'tr8n', :path => '...' but I get a strange error saying:
    Mysql2::Error: Table 'Myapp.tr8n_applications' doesn't exist

@silviorelli
Copy link

And... I can confirm what @whitehat101 said, 973fb52 works with latest Rails version

@silviorelli
Copy link

Okay I discovered that the released gem (3.2.3) is one year old.
The "ActiveModel::MassAssignmentSecurity::Error in Tr8n::LanguageController#switch" error is fixed in the current source.
I think you can close this issue.

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

5 participants