Re: empty emtry in database problem

Harold
Mon, 30 Jun 2008 12:57:05 -0000

You are probably setting the attribute to an empty string before
saving the record/model instance. How is the attribute being
populated?

Empty string is still valid (not null)...


On Jun 30, 8:15 am, "supriya agarwal"
<supriya.ii...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> sorry but that i alreayd tried.. not working .. still saving a field as
> empty in database.!! :(
>
> On Mon, Jun 30, 2008 at 5:28 PM, Sijo Kg
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
> wrote:
>
>
>
> > Hi
> >  In migration file you can speciy like
> > :null => true
>
> > If false, the underlying column has a not null constraint added (if
the
> > database supports it).
>
> > You can use like
> > t.column :name_last, :string, :null=>true     (for example)
>
> > And already migration file exists you can change column type using
> > change_column
>
> > Sijo
> > --
> > Posted viahttp://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com