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
Using translated fields with formtastic #1
Comments
Seems like this is an issue only with formtastic. Maybe formtastic looks into the attributes hash of ActiveModel. But a patch is greatly appreciated! Greetings |
Actually this is a problem with plain Rails forms too. I just created a new Rails project to try it out: rails new purettest
cd purettest
echo "gem 'puret'" >> Gemfile
bundle
rails generate scaffold post title:string description:text
rake db:migrate
rails generate puret:model Post title:string description:text
rake db:migrate
rails server Go to /posts, create a new post and then try editing it, you will see that the form field is not prefilled. |
merged. Thank you all. |
Thank you for nice plugin. I have a problem when I use translated fields in forms with Formtastic.
When I use in views:
= semantic_form_for [:admin, @page] do |f|
= f.inputs do
= f.input :title
= f.buttons
Field title not shown correctly. Workaround is to use in forms proxy field, like title_translated below:
Then:
= semantic_form_for [:admin, @page] do |f|
= f.inputs do
= f.input :title_translated
= f.buttons
Works fine. How can I use translated fields in forms without such proxy fileds?
The text was updated successfully, but these errors were encountered: