Re: Shouldn''t this insert in table?

Colin Law
Wed, 02 Sep 2009 15:28:55 -0000

2009/9/2 RVince
<rvince99-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org>:
>
> in MyAController I want to create an instance of MyBModel, and have it
> insert into the table for the MyB models
>
> So, in a function in MyAController, I have
>
> MyB myB = MyB.new
> myB.something = whatever
> myB.save
>
> Shouldn''t that have inserted a new row into the table for MyB
models?

Test the return value from save to see if it succeeded.  Look in the
log (log/development.log) to see if any errors there.

Colin

>
>
> >
>