Forum: Ruby on Rails validate_presence_of problem

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
E38118c6d20b4544e424fd700571e090?d=identicon&s=25 srikanth (Guest)
on 2009-03-05 15:38
(Received via mailing list)
In my application i want to validate the fields of perticular views.
in my application:
controller name: streams_controller
model name: stream
and i want to validates a text field in the view  "new.html.erb".here
tis field take a file to be uploaded

i have a text field called :location in new.html.erb view
to validate this field i have wriiten code in model like:

class Stream < ActiveRecord::Base
validates_presence_of :location

i did not see any validation.
Can any one help where i am doing hte mistake.

40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (conradwt)
on 2009-03-05 16:07
(Received via mailing list)
On Thu, Mar 5, 2009 at 6:34 AM, srikanth <> wrote:

> to validate this field i have wriiten code in model like:
> thanks
> Srikanth

Hi, please take a look at look at the following:


Good luck,

This topic is locked and can not be replied to.