I installed paperclip and use it to handle photo attachment. I have a simple for开发者_运维知识库m where i can upload photo's works perfect by the way.. But i want to adjust the "browse" button, for example change it's name... Or even better hide the text field, so that there's only an upload button with the text, "upload photo..."
This the form code:
<div class="photoupload"
<%= f.label :description %>
<%= f.text_field :description %>
<%= f.file_field :photo %>
</div>
Regards!
Seems like you can't really change the button, but you can make it invisible, set its z-index (so it is underneath everything else) and use css to position some styled block on top of it.
http://www.quirksmode.org/dom/inputfile.html
精彩评论