-
Notifications
You must be signed in to change notification settings - Fork 630
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
formtastic paperclip attribute detection generates wrong html #36
Comments
What's the actual name of the file upload field? Can we see the code you're using to get this output? You're getting a "string" input rather than a "file" input because Formtastic doesn't think this field is a file upload field. There's some rudimentary checking in there (see @@file_methods config option and the code around line 1025), but without knowing the name of the attribute and some more stuff about your model, I can't write a decent (failing) test. |
I think i should mention that I use Ruby 1.9.1. Not sure if this makes a difference, but I tried to run the specs last night and 95% of all testcases were failing. |
Pasting in DM from brainlag so all info is one one place: I think Formtastic thinks it is a "file" because the input box it generates with some text filled in. See the value attribute of the input field. Model: class Map < ActiveRecord::Base
end <% semantic_form_for :map, :html => {:multipart => true}, :url => maps_path do |form| %> |
ok, i found what is wrong when you use semantic_form_for you should pass an instance variable and not a symbol so it is all my fault |
good know nothing serious was broken! |
Html generated with autodetection:
Html generated whenn forced to :file (:as => :file)
Field*
The text was updated successfully, but these errors were encountered: