I have just deployed an existing app to a new server and have noticed that where model names are automatically generated (by Formtastic) it instead outputs {{model}} rather than the expected name.
Fo开发者_Python百科r example, in the linked image it should read 'Create Category' but instead reads 'Create {{model}}' https://skitch.com/simon180/rr4w9/example
I don't know where to start in figuring what causes this.
Rails version is 2.3.5 (vendored) and gems vendored too.
Any suggestions gratefully received!
Thanks
Simon
Have a look in the formtastic gem, depending on what version you have, the file will be
/lib/formtastic/i18n.rb
or
formtastic/lib/locale/en.yml
it should have something like this:
'Create %{model}'
but yours will have:
'Create {{model}}'
Thats the old format. Change occurrences of {{foo}} to %{foo}
or
Updating the formtastic gem should do the trick
Another option is to downgrade the i18n gem to 0.4.1 this problem will disappear.
The problem is with the i18n gem version. From version 0.4.1 on, the way of accessing variables isn't {{variable}}
anymore.
精彩评论