unmantained-activeadmin-plugins / activeadmin-globalize

MIT License
51 stars 189 forks source link

Validation errors are not shown #1

Closed lmb closed 11 years ago

lmb commented 11 years ago

Hi,

Found your gem through a Google search and have been playing with it, pretty smooth sailing so far. One thing I noticed was that if a translation has validators attached to it, and if validation fails, the form is not saved (create and update) and no validation errors are shown.

Very simple example:

class Page < ActiveRecord::Base
  # attr_accessible :title, :body
  # translates :title, :body

  active_admin_translates :title, :body do
    validates_presence_of :title, :body
  end
end

Leaving either title or body empty keeps the Model from being created / update, as intended, but no validation errors are shown. Also, values are not persisted (i.e. emptying title on an already created model and submitting will show a form with the old title value and no errors).

Regards, Lorenz

stefanoverna commented 11 years ago

Thanks @lmb, should be fixed now!