I am formatting the value of a text_field.
text_field ... { :value => format_date(@employment_record.hire_date)
...
When a new record does not have a hire_date my helper code gets a
NilClass. My helper code performs checks and only applies formatting
when passed a valid date. When a NilClass is recieved I have tried
returning the NilClass itself, blank strings, test dates, everything
creates a global error.
The helper works fine when not used to set a value on a text_field.
What am I missing?
Thanks.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---