# Hello good eve to all

**URL:** <https://www.ruby-forum.com/t/hello-good-eve-to-all/149199>\
**Category:** Rails\
**Created:** [September 22, 2008, 2:11pm UTC](https://www.ruby-forum.com/t/hello-good-eve-to-all/149199 "2008-09-22T14:11:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sathiya](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f05b48/32.png) [@Sathiya](https://www.ruby-forum.com/u/Sathiya)\
**Post date:** [September 22, 2008, 2:11pm UTC](https://www.ruby-forum.com/t/hello-good-eve-to-all/149199/1 "2008-09-22T14:11:50Z")

</div>

how the form validation in rubyonrails and how to retrieve the image  
from database and how to upload the image in rubyon rails

---

<div class="post-metadata">

**Author:** ![Sathiya](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f05b48/32.png) [@Sathiya](https://www.ruby-forum.com/u/Sathiya)\
**Post date:** [September 22, 2008, 3:17pm UTC](https://www.ruby-forum.com/t/hello-good-eve-to-all/149199/2 "2008-09-22T15:17:38Z")

</div>

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!
