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_as_attachment does not allow for custom error messages #1

Open
vrinek opened this issue Jun 25, 2009 · 1 comment
Open

validates_as_attachment does not allow for custom error messages #1

vrinek opened this issue Jun 25, 2009 · 1 comment

Comments

@vrinek
Copy link

vrinek commented Jun 25, 2009

validates_as_attachment replaced validates_attachment but the former seems to not have support for custom error messages (which we use for other languages)

this a workaround I use: http://gist.github.com/135810

@darrenterhune
Copy link

Why don't you use the validate method, which gets ran instead of using a call back method.

example:

def validate
  errors.add_to_base("Filename is blank") if self.filename == nil
end

jaischeema referenced this issue in bellroy/attachment_fu Jun 6, 2013
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