try putting this in your controller

def after_create_save
  @record.reload
end


On Thu, Mar 12, 2009 at 8:36 AM, rbarton <[email protected]> wrote:

>
> As a workaround, you could define an after_create_save(record) in your
> pessoa_juridicia_controller and call record.unidades there.  This
> should reload the association before the record instance variable is
> passed to the _list_record partial for rendering...
>
> Ryan
>
> On Mar 4, 1:52 pm, "G. Sobrinho" <[email protected]> wrote:
> > Hello,
> >
> > I have this situation: PessoaJuridica has_many Unidades
> > On create a new pessoa juridica, one new record is inserted in unidades
> > table (using after_create callback on pessoa juridica model).
> >
> > The problem is... When i create, the new line is prepended to table. But
> the
> > association is not shown (dash is show instead).
> > If i reload with F5 the association is showed normally.
> >
> > The log show the pessoa juridica and unidade created with success... So I
> > think this is a active scaffold bug...
> >
> > Sugestions?
> >
> > Thanks in advance
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to