2009/6/12 Jon <[email protected]>:
>
> Despite much googling and book checking, I can't for the life of me
> figure out how to check if the time_zone object is nil.  The situation
> is that I built a fun little delayed email delivery app -- 
> http://mailthislater.com
> if you're interested -- and want to ensure that the user selects his
> time zone.  I can validate, throw errors on, and rescue all the other
> form fields.   I tried checking in the before_filter that creates the
> time zone object, in the create method, but no dice.  I think I'm just
> not understanding some of the basics - so I'm sorry if this isn't even
> a meaningful question.  Would it help if I posted controller code?
> Thanks.

validates_presence_of will check that a value has been entered for a
field so may do what you are looking for.

Colin

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
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