how the form validation in rubyonrails and how to retrieve the image from database and how to upload the image in rubyon rails
Sathiya wrote:
how the form validation in rubyonrails and how to retrieve the image from database and how to upload the image in rubyon rails
through model u can validate.using moel valaidations ex:validates_presence_of :name,:message=>"Required fields cannot be left blank"
upload file by using in html <%= file_column_field "manufacturer_document", "document" ,:class=>'txt_box_sall'%>
manufacturer_document ---- it denotes model name document ------ denotes field name in db in controller the code is @manufacturer_document = ManufacturerDocument.new(params[:manufacturer_document]) @manufacturer_document.save
now your doubt clears!