Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation errors are not shown #1

Closed
lmb opened this issue Nov 22, 2012 · 1 comment
Closed

Validation errors are not shown #1

lmb opened this issue Nov 22, 2012 · 1 comment

Comments

@lmb
Copy link

lmb commented Nov 22, 2012

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
Copy link
Contributor

Thanks @lmb, should be fixed now!

alsemyonov pushed a commit to alsemyonov/activeadmin-globalize that referenced this issue Nov 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants