[Sdruby] :required?

Chris Abad chris at integralimpressions.com
Wed Sep 13 21:09:18 GMT 2006


Okay, I got it fixed. There was nothing in the logs except the  
absence of the select statement. However, I did find the problem to  
be a misbehaving before_create callback. I was using before_create to  
set default values on my model object. For one reason or another it  
suddenly broke (maybe before_create does weird things when you do  
Object.create?)... but after thinking about it, using after_create is  
really more appropriate anyways since none of my defaults have to do  
w/ validation.

On Sep 13, 2006, at 1:32 PM, Kevin Clark wrote:

What happens in the logs?

On 9/13/06, Chris Abad <chris at integralimpressions.com> wrote:
> I have a model object which has an attribute called required, which
> is a boolean value. So if I want that to be false, I might do this:
>
> Model.create(:required => false)
>
> Anyone know why that would prevent the object from being created?
> There are no errors... it just won't write the row to the database.
> _______________________________________________
> Sdruby mailing list
> Sdruby at lists.sdruby.com
> http://lists.sdruby.com/mailman/listinfo/sdruby
>


-- 
Kevin Clark
http://glu.ttono.us
_______________________________________________
Sdruby mailing list
Sdruby at lists.sdruby.com
http://lists.sdruby.com/mailman/listinfo/sdruby

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://comox.textdrive.com/pipermail/sdruby/attachments/20060913/98d609ac/attachment.htm


More information about the Sdruby mailing list