Other than calculating by hand the :lft and :rgt for my fixtures for classes that use betternestedset, is there an easier (automagic) way? Thanks in advance, Alan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Clever Neologism
2008-Apr-21 16:35 UTC
Re: Easy way to create fixtures that use betternestedset?
http://nubyonrails.com/articles/2005/12/27/dump-or-slurp-yaml-reference-data http://snippets.dzone.com/tag/fixtures Create your DB records in irb or some other ruby script file outside of rails in a temporary DB (or just use your existing DB), then use that to export the YAML from the live data. On Apr 21, 11:32 am, "Alan Smith" <alan0...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Other than calculating by hand the :lft and :rgt for my fixtures for > classes that use betternestedset, is there an easier (automagic) way? > > Thanks in advance, > > Alan--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Alan Smith
2008-Apr-21 18:55 UTC
Re: Easy way to create fixtures that use betternestedset?
Thanks!! On Mon, Apr 21, 2008 at 11:35 AM, Clever Neologism <gestahl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > http://nubyonrails.com/articles/2005/12/27/dump-or-slurp-yaml-reference-data > http://snippets.dzone.com/tag/fixtures > > Create your DB records in irb or some other ruby script file outside > of rails in a temporary DB (or just use your existing DB), then use > that to export the YAML from the live data. > > > > On Apr 21, 11:32 am, "Alan Smith" <alan0...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Other than calculating by hand the :lft and :rgt for my fixtures for > > classes that use betternestedset, is there an easier (automagic) way? > > > > Thanks in advance, > > > > Alan > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---