Iam new at rubyonrails. I implemented the image upload in my
application.
The image uploaded successfully but if iam trying to see those uploaded
images they look awful.
So plz help me out in this issue.
this is my rhtml file
<%= form_tag({ :action => “create” }, :multipart => true) %>
Image:
<%= submit_tag 'upload' %>
<%= end_form_tag %> controllerdef create
File.open(RAILS_ROOT + "
/public/images/#{@params[‘picture’].original_filename}", “w”) { |f|
f.write(@params[“picture”].read) }
redirect_to :controller => ‘admin’, :action => “new1”,
:bildpfad=> @request.protocol + @request.host_with_port + "
/images/#{@params[‘picture’].original_filename}"
end