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
File input for paperclip #999
Comments
I also see this with paperclip 4.1. I presume it has to do with the new required file type validations The stack trace with
|
@derekprior I can buy that this is probably an issue in Formtastic, but can you please confirm that you've set up the model appropriately as per this article? http://robots.thoughtbot.com/prevent-spoofing-with-paperclip The final nail in the coffin would be proving your model works with paperclip fine without Formtastic, and we could use that working example to figure out what needs to change in Formtastic going forward. |
cc @vladislavbakan too — need some help to understand what needs to change in Formtastic (if anything). |
@justinfrench here's a dead simple reproduction in a stock rails app (the generator used Rails 4.1, but I also get this in 4.0.x), paperclip 4.1.1 and formtastic master: https://github.com/derekprior/formtastic_bug |
@justinfrench It looks like the problem is that formtastic is assuming that if there's a conditional on the validation that responds to https://github.com/justinfrench/formtastic/blob/master/lib/formtastic/inputs/base/validations.rb#L39 |
@derekprior you're so close, any chance of starting a patch or pull request? :) |
I have same problem 😢 Any progress on this issue? |
makes paperclip upload work fixes formtastic#999
This bit me today. Took a long time to find an answer on StackOverflow mentioning the workaround of using :required. The error message is quite unhelpful. |
rails 4
model
has_attached_file :image...
paperclip image attachmentview
f.input :image, :as => :file
throws error (wrong argument)f.input :image, :required => false, :as => :file
resolves issueThe text was updated successfully, but these errors were encountered: