I'm using gems: globalize3 and easy_globalize3_accessors. I have a problem with validations. For example, I have Post model:
class Post
translates :title, :content
globalize_accessors :locales => [:en, :ru], :attributes => [:title, :content]
validates :title, :content, :presence => true
end
and form:
= form_for @post do |f|
-I18n.available_locales.each do |locale|
= f.text_field "title_#{locale}"
= f.text_area "content_#{locale}"
it looks like in view (if I18n.locale = :ru):
<form action="/ru/posts" method="post">
<input id="post_title_ru" name="post[title_ru]" type="text" />
<textarea cols="40" id="post_content_ru" name="vision[content_ru]"></textarea>
<input id="post_title_en" name="post[title_en]" type="text" />
<textarea cols="40" id="post_content_en" name="vision[content_en]"></textarea>
<input name="commit" type="submit" value="Создать Видение" />
</form>
If I fill in the fields only in Russian, the validation passes, if I wanted to post was in English only, and fill only the English field (when I18n.locale = :ru), the validation fails
Title can't be blank
Content can't be blank
As I understand it, there is a problem in the attributes, validation checks only the first attributes :title_ru and :content_ru. And to the rest of attributes (:content_en and :title_en) check does not reach.
how to make a second data validator to check if the validation of the first group of attributes is not passed?
thanks in advance