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!
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to