El Wednesday 29 April 2009 09:17:36 Sergio Cambra .:: entreCables S.L. ::. 
escribió:
> El Tuesday 28 April 2009 18:10:06 G. Sobrinho escribió:
> > In really, the line is not updated. The example is:
> >
> > My model Company, have many Business Units, have a after_save method
> > which create a new Business Unit associated.
> > The AS doesn't load this new association, i need to call reload method
> > at bottom of after_save method to this appear in the table.
>
> We can add reload after saving a record, but reload isn't needed in most
> situations. Really the right way is add reload in after_update_save in the
> controller, in @record or @record.association

Or you can submit a bug report to rails, in order to set association instead 
of only setting the id (I think is your problem, although I may be wrong)

>
> > Em Ter, 2009-04-28 às 17:24 +0200, Sergio Cambra .:: entreCables
> >
> > S.L. ::. escreveu:
> > > El Tuesday 28 April 2009 17:11:05 G. Sobrinho escribió:
> > > > Sergio,
> > > >
> > > > You can make another option. Reload the line after updating a
> > > > field... I think is better
> > >
> > > Do you mean the line in list? I think line is already reloaded after
> > > you update the record. This is about create/update forms, I think it's
> > > better explained in the wiki.
> > >
> > > > --
> > > > Regards,
> > > >
> > > > Gabriel Sobrinho
> > > >
> > > > Em Ter, 2009-04-28 às 17:11 +0200, Sergio Cambra .:: entreCables
> > > >
> > > > S.L. ::. escreveu:
> > > > > It's a feature which has been requested many times. For example in
> > > > > these threads:
> > > > > http://groups.google.com/group/activescaffold/browse_thread/thread/
> > > > >6a a2ca 7641d66102
> > > > > http://groups.google.com/group/activescaffold/browse_thread/thread/
> > > > >69 163d 469cb07b3f
> > > > >
> > > > > It's about rendering again a field after change a value in another
> > > > > field. Now you can get it only with a line in your controller:
> > > > > config.columns[:master_column].options = {:update_column =>
> > > > >
> > > > > :slave_column}
> > > > >
> > > > > Field for slave column will be rendered again when you change the
> > > > > value in master column. It will work if rendering slave column only
> > > > > needs the value of master column.
> > > > >
> > > > > I haven't tried with two levels of chained fields as in second
> > > > > thread, probably it needs more tweaking for that case.
> > > > > I'm documenting it in the wiki:
> > > > > http://wiki.github.com/activescaffold/active_scaffold/chaining-form
> > > > >-f ield s



-- 
Sergio Cambra .:: entreCables S.L. ::.
Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]

--~--~---------~--~----~------------~-------~--~----~
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