It's catching everything fine but the problem is when the form refreshes
it displays the most recent uploaded picture (in this case) from the tmp
folder. So if I uploaded an image that was too big it will display that
one.
It's catching everything fine but the problem is when the form refreshes it displays the most recent uploaded picture (in this case) from the tmp folder. So if I uploaded an image that was too big it will display that one.
Any thoughts?
You can try something like
<% if model.errors.on(:avatar) %>
Invalid avatar
<% else %>
<%= image_tag url_for_image_column('model', 'avatar') %>
<% end %>