Render problem in Rails form validation errors
I'm using rails 2.3.8 with Bundler gem.
I just installed Faker gem (Gemfile), and then suddenly all forms validations errors became like this:
{{count}} errors prohibited this {{model}} from being saved
There were probl开发者_JS百科ems with the following fields:
* {{attribute}} {{message}}
* {{attribute}} {{message}}
It seems that the variables are not printed properly.
What could cause this behavior in Rails? Where to start to solve the problem, if I need to keep Faker?Faker declares a dependency on i18n
, and it seems that Bundler has helpfully installed it for you.
Unfortunately, the API has changed in the latest version (0.5.0) and is incompatible with the version that comes bundled with Rails 2.3
The most straight forward solution would be to stop using Gemfiles with 2.3 and rely on Faker picking up the bundled version of i18n (which Bundler can't see).
精彩评论