-
Notifications
You must be signed in to change notification settings - Fork 87
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
SimpleForm displays single line input fields for translated attributes #109
Comments
@jmuheim To work around this, use SimpleForm's = f.input :content, as: :text |
Thanks @pwim, I was going to look to see if something like that was possible. @jmuheim Mobility can't really fix this kind of problem, since ultimately translated attributes are virtual attributes, not table columns. There are only going to be situation-specific solutions like the one above. However, I will add the workaround above to the wiki. |
Added to the wiki page on using Mobiliity with forms. |
@shioyama SimpleForm uses type_for_attribute to determine which input type to create. I suppose we could overwrite this method to delegate to the backend, but that might open another can of worms. I don't see this as something Globalize needs to support, but if someone was to want to step up and create a PR to handle it, I think it would be worth considering. |
|
Good catch. For the record, this isn't something that Globalize handles either. |
That's an idea, but I'd suggest maybe having another gem like |
I have a text field
:content
.Usually, SimpleForm correctly displays a textarea for it:
When translating the field using Mobility, it displays a single line input!
If you need a demo Rails application, I can set up one for you.
The text was updated successfully, but these errors were encountered: