I have this input field in Rails 3.1:
<%=f.file_field :image, :id => "upload"%>
I want to add this JavaScript before the input field:
onchange="readURL(this);
How can I do this?
Must see in HTML sth like:
<input type="file" onchange="readURL(this); name="post[image]" id="upload">