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

Browser validations break save on persisted objects with images #2376

Closed
tagliala opened this issue Aug 10, 2015 · 5 comments
Closed

Browser validations break save on persisted objects with images #2376

tagliala opened this issue Aug 10, 2015 · 5 comments

Comments

@tagliala
Copy link
Contributor

Let's say we have a model with an image

class Player < ActiveRecord::Base
  mount_uploader :image, ImageUploader

  validates :name, presence: true
  validates :image, presence: true
end

Saving a new object or editing the image is fine
screen shot 2015-08-10 at 15 44 50

but when you try to save a persisted model without editing the image, you get a validation error on the file upload field

screen shot 2015-08-10 at 15 45 22

Refers to #2339 #2373

@mshibuya
Copy link
Member

Merged #2373.

@tagliala
Copy link
Contributor Author

btw this is still an issue with browser validations activated (default behaviour)

This should be reopened

@mshibuya mshibuya reopened this Aug 13, 2015
@mshibuya
Copy link
Member

Fixed now, thanks!

@dalpo
Copy link
Contributor

dalpo commented Aug 13, 2015

👍 Thanks!

@tagliala
Copy link
Contributor Author

thanks and sorry for not submitting a PR myself

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

3 participants