0

I got an issue with Globalize3, i have build a module to add translations in Admin for Preferences User

I display each translation by her ID and her locale. But i don't understand why the locale is not define when i want to display the page.

The gist for better show : https://gist.github.com/266562670cd8dab28548#gistcomment-43681

Thanks for your help

Fixed.

rbinsztock
  • 3,025
  • 2
  • 21
  • 34

1 Answers1

1

If you have a look at the params you are getting in the update action for the perference topic translation (just raise params[:preference_topic_translation]). You'll notice you probably have preference_topic_option_translation coming through as one of the attributes which doesn't exist on the model.

You need to update line #12 in the form:

<%= f.fields_for preference_topic_option_translation do |translate_form| %>

It should read:

<%= f.fields_for :preference_topic_option_translations, preference_topic_option_translation do |translate_form| %>
Mario Visic
  • 2,653
  • 1
  • 22
  • 29