I’m using ActiveRecord with Sinatra and there’s no error_messages_for helper so I have to handle it myself. It’s easy to go through @model.errors object manually or just to output it with .to_json or .to_xml but errors’ text contain template variables which I don’t know how to get rid of. So with error text I’m recieving something like:
["username","is too short (minimum is {{count}} characters)"]
Where does {{count}} come from and how to replace it with the actual value?
It sounds like you have a late version of i18n with an older version of ActiveSupport. ActiveSupport before 2.3.9 aren’t compatible with i18n 0.4 or later.
I would recommend updating to ActiveRecord 2.3.10 if possible. If you’re stuck with the older version of ActiveRecord you could lock i18n to 0.3.7.