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

validates_size_of does not work on Rails 3.0.6 and later #342

Closed
bensie opened this issue May 30, 2011 · 1 comment
Closed

validates_size_of does not work on Rails 3.0.6 and later #342

bensie opened this issue May 30, 2011 · 1 comment

Comments

@bensie
Copy link
Member

bensie commented May 30, 2011

This commit between Rails 3.0.5 and 3.0.6 breaks the validates_size_of (validates_length_of) functionality in Carrierwave:
rails/rails@v3.0.5...v3.0.6#diff-41

Instead of checking the contents of the file with .size, it's checking the length of the full path to the file (something like "/uploads/tmp/20110530-1356-12610-1761/test.jpeg".length => 47).

@trevorturk
Copy link
Contributor

Yeah, I noticed that -- I had an issue open related (#328), but this is better. Any chance you want to work up a fix? Ideas?

@bensie bensie closed this as completed in 8fc8181 May 31, 2011
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