[Rails] Re: Error when updating with an image file
You said that doing @lead.illustration = upload_image (presumably at
this point) did not work. It should do, provided that
params[:lead][:illustration] is not present. If it is then the value
from upload_image will be overwritten by the value from params when
you call update_attributes. Another possibility is that if the
illustration is the only field being changed then update_attributes
may not actually save the record (as it does not think anything has
changed).
Probably leaving it as you have it is the simplest solution.
Colin
I too guess it should do but I will leave it this way for now.
Thx Colin.
-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/rrEHktJE3PwJ.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home