Consider this
if params['image'].nil?
In html's case, I used the above and it checked the presence of file and hence i changed the path accordingly. How can I check it in erb?
I have a
<%= f.file_field :IMAGE %>
in my code and when I click on the submit button, I have to store my image in a database and use it or i want to store the images in files and store the path in database so i can display the image later.
How can I do this?