I'll try it tomorrow. Hope it works. Thank you!

On Jul 22, 2:56 pm, "Sergio Cambra .:: entreCables S.L. ::."
<[email protected]> wrote:
> On Jueves, 22 de Julio de 2010 12:54:11 Yuriy Padlyak escribió:
>
> > Hello Sergio,
>
> > Could you please explain how you fixed it in detail?
> > Thank you in advance.
>
> You can look at diff 
> at:http://github.com/activescaffold/active_scaffold/commit/0cbb8038f67dd...
>
> params sent are a hash like:
> {
>   record => {
>     children =>{
>       10201241 => {...},
>       10201244 => {...}
>     }
>   }
>
> }
>
> 10201241 and 10201244 are temporary id which ActiveScaffold generates for new
> records. Hashes has no defined order, so iterating in hash you can get first
> 10201244 and later 10201241, so sorting the hash fixes creation order.
>
>
>
>
>
> > On Jul 22, 10:36 am, "Sergio Cambra .:: entreCables S.L. ::."
>
> > <[email protected]> wrote:
> > > On Miércoles, 21 de Julio de 2010 13:00:12 Yuriy Padlyak escribió:
> > > > Hi All,
>
> > > > I'm having problem with one to many sub-form items order. When I
> > > > create few sub items, on save they are added to the database in the
> > > > random order. Can it be changed?
>
> > > Yes, it was easy to fix. I have added a sort by the temporary id which
> > > ActiveScaffold generates. I have committed to rails-2.3 and master
> > > branches.
>
> > > --
> > > Sergio Cambra .:: entreCables S.L. ::.
> > > Mariana Pineda 23, 50.018 Zaragoza
> > > T) 902 021 404 F) 976 52 98 07 E) [email protected]
>
> --
> Sergio Cambra .:: entreCables S.L. ::.
> Mariana Pineda 23, 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