In my daily development, I migrate back and forth between versions, and often do: rake load_fixtures... ... in order to populate my development database with fun data. Now, with any HABTM relationship, there are failures, as there is no way to say "which" fixtures to load first. Within an actual functional or unit test case, you could simply load them in the proper order, but I''m not doing any tests yet, but simply using the fixture data for development purposes. Either there is a major loophole in this process, or, I''m totally approaching this wrong. I''m voting for the latter :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060222/579afeb9/attachment.html
Found the answer, albeit, it would be nice if this feature existed natively within Rails :) http://kekova.ca/articles/2005/12/31/loading-your-test-db-to-your-development-db Thanks Chris ! On 2/22/06, Dylan Stamat <dylans@gmail.com> wrote:> > In my daily development, I migrate back and forth between versions, and > often do: rake load_fixtures... > ... in order to populate my development database with fun data. > > Now, with any HABTM relationship, there are failures, as there is no way > to say "which" fixtures to load first. > > Within an actual functional or unit test case, you could simply load them > in the proper order, but I''m not doing any tests yet, but simply using the > fixture data for development purposes. > > Either there is a major loophole in this process, or, I''m totally > approaching this wrong. I''m voting for the latter :) >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060223/12459dc5/attachment.html
I had a related question... Does anyone know how to have the elements inside the fixtures loaded in order. I want to guarantee that the items in the yml fixture file get loaded in order (see below - item1 loaded before item2) item1: value: item2 value: Thanks, Zack On 2/22/06, Dylan Stamat <dylans@gmail.com> wrote:> > Found the answer, albeit, it would be nice if this feature existed > natively within Rails :) > http://kekova.ca/articles/2005/12/31/loading-your-test-db-to-your-development-db > > > Thanks Chris ! > > > > On 2/22/06, Dylan Stamat <dylans@gmail.com> wrote: > > > > In my daily development, I migrate back and forth between versions, and > > often do: rake load_fixtures... > > ... in order to populate my development database with fun data. > > > > Now, with any HABTM relationship, there are failures, as there is no way > > to say "which" fixtures to load first. > > > > Within an actual functional or unit test case, you could simply load > > them in the proper order, but I''m not doing any tests yet, but simply using > > the fixture data for development purposes. > > > > Either there is a major loophole in this process, or, I''m totally > > approaching this wrong. I''m voting for the latter :) > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060223/ec63e245/attachment.html
if you need a certain order, you might handle that with your object calls.... like has_many :order and such. I would never rely on my items to be in a specific order in the database. Just my .02 -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Zack Chandler Sent: Thursday, February 23, 2006 10:41 AM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Re: Fixtures and Relationships I had a related question... Does anyone know how to have the elements inside the fixtures loaded in order. I want to guarantee that the items in the yml fixture file get loaded in order (see below - item1 loaded before item2) item1: value: item2 value: Thanks, Zack On 2/22/06, Dylan Stamat <dylans@gmail.com > wrote: Found the answer, albeit, it would be nice if this feature existed natively within Rails :) http://kekova.ca/articles/2005/12/31/loading-your-test-db-to-your-develo pment-db Thanks Chris ! On 2/22/06, Dylan Stamat < dylans@gmail.com <mailto:dylans@gmail.com> > wrote: In my daily development, I migrate back and forth between versions, and often do: rake load_fixtures... ... in order to populate my development database with fun data. Now, with any HABTM relationship, there are failures, as there is no way to say "which" fixtures to load first. Within an actual functional or unit test case, you could simply load them in the proper order, but I''m not doing any tests yet, but simply using the fixture data for development purposes. Either there is a major loophole in this process, or, I''m totally approaching this wrong. I''m voting for the latter :) _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060223/dbcd7665/attachment-0001.html
+1 on what Brian said. Now, is there a way to ensure the foreign keys you populate are valid ? ie... use ActiveRecord within the YAML to get some relevant data ? For example, consider this setup: ========================create_table "cats", :force => true do |t| t.column "hair", :string end create_table "dogs", :force => true do |t| t.column "legs, :string end create_table "vets", :force => true do |t| t.column "cats_id", :integer t.column "dogs_id", :integer t.column "dr_name", :string end ======================== I load my fixtures in the proper order, :cats, :dogs, :vets The cats and dog tables are now populated with valid data. Now, within my vets fixture, I want to create a bunch of test vets, but want to ensure the foreign keys are populated with valid cat and dog ids. I tried the following, but it complains about the @cats being nil. I''m assuming AR isn''t available here, or... err, I''m not sure: vets.yml =========================<% @cats = Cat.find(:all) @dogs = Dog.find(:all) %> <% 1.upto(40) do |i| %> vet_<%= i %>: cat_id: <%= rand(@cats.length + 1) %> dog_id: <%= rand(@dogs.length + 1) %> dr_name: blah <% end %> ========================= No dice. Any insight on how to accomplish this would be greatly appreciated ! =Dylan On 2/23/06, Hogan, Brian P. <HOGANBP@uwec.edu> wrote:> > if you need a certain order, you might handle that with your object > calls.... like has_many :order and such. I would never rely on my items to > be in a specific order in the database. Just my .02 > > -----Original Message----- > *From:* rails-bounces@lists.rubyonrails.org [mailto: > rails-bounces@lists.rubyonrails.org] *On Behalf Of *Zack Chandler > *Sent:* Thursday, February 23, 2006 10:41 AM > *To:* rails@lists.rubyonrails.org > *Subject:* Re: [Rails] Re: Fixtures and Relationships > > I had a related question... Does anyone know how to have the elements > inside the fixtures loaded in order. I want to guarantee that the items in > the yml fixture file get loaded in order (see below - item1 loaded before > item2) > > item1: > value: > > item2 > value: > > Thanks, > Zack > > On 2/22/06, Dylan Stamat <dylans@gmail.com > wrote: > > > > Found the answer, albeit, it would be nice if this feature existed > > natively within Rails :) > > http://kekova.ca/articles/2005/12/31/loading-your-test-db-to-your-development-db > > > > > > Thanks Chris ! > > > > > > > > On 2/22/06, Dylan Stamat < dylans@gmail.com> wrote: > > > > > > In my daily development, I migrate back and forth between versions, > > > and often do: rake load_fixtures... > > > ... in order to populate my development database with fun data. > > > > > > Now, with any HABTM relationship, there are failures, as there is no > > > way to say "which" fixtures to load first. > > > > > > Within an actual functional or unit test case, you could simply load > > > them in the proper order, but I''m not doing any tests yet, but simply using > > > the fixture data for development purposes. > > > > > > Either there is a major loophole in this process, or, I''m totally > > > approaching this wrong. I''m voting for the latter :) > > > > > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060223/7b6a612c/attachment.html
Boy that would be cool. Right now I just dump my development database to fixtures using the great plugin from here: http://nubyonrails.com/articles/2005/12/27/dump-or-slurp-yaml-reference- data Quite a time-saver. -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Dylan Stamat Sent: Thursday, February 23, 2006 12:29 PM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Re: Fixtures and Relationships +1 on what Brian said. Now, is there a way to ensure the foreign keys you populate are valid ? ie... use ActiveRecord within the YAML to get some relevant data ? For example, consider this setup: ========================= create_table "cats", :force => true do |t| t.column "hair", :string end create_table "dogs", :force => true do |t| t.column "legs, :string end create_table "vets", :force => true do |t| t.column "cats_id", :integer t.column "dogs_id", :integer t.column "dr_name", :string end ======================== I load my fixtures in the proper order, :cats, :dogs, :vets The cats and dog tables are now populated with valid data. Now, within my vets fixture, I want to create a bunch of test vets, but want to ensure the foreign keys are populated with valid cat and dog ids. I tried the following, but it complains about the @cats being nil. I''m assuming AR isn''t available here, or... err, I''m not sure: vets.yml =========================<% @cats = Cat.find(:all) @dogs = Dog.find(:all) %> <% 1.upto(40) do |i| %> vet_<%= i %>: cat_id: <%= rand(@cats.length + 1) %> dog_id: <%= rand(@dogs.length + 1) %> dr_name: blah <% end %> ========================= No dice. Any insight on how to accomplish this would be greatly appreciated ! =Dylan On 2/23/06, Hogan, Brian P. < HOGANBP@uwec.edu <mailto:HOGANBP@uwec.edu>> wrote:if you need a certain order, you might handle that with your object calls.... like has_many :order and such. I would never rely on my items to be in a specific order in the database. Just my .02 -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto: rails-bounces@lists.rubyonrails.org <mailto:rails-bounces@lists.rubyonrails.org> ] On Behalf Of Zack Chandler Sent: Thursday, February 23, 2006 10:41 AM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Re: Fixtures and Relationships I had a related question... Does anyone know how to have the elements inside the fixtures loaded in order. I want to guarantee that the items in the yml fixture file get loaded in order (see below - item1 loaded before item2) item1: value: item2 value: Thanks, Zack On 2/22/06, Dylan Stamat <dylans@gmail.com > wrote: Found the answer, albeit, it would be nice if this feature existed natively within Rails :) http://kekova.ca/articles/2005/12/31/loading-your-test-db-to-your-develo pment-db Thanks Chris ! On 2/22/06, Dylan Stamat < dylans@gmail.com <mailto:dylans@gmail.com> > wrote: In my daily development, I migrate back and forth between versions, and often do: rake load_fixtures... ... in order to populate my development database with fun data. Now, with any HABTM relationship, there are failures, as there is no way to say "which" fixtures to load first. Within an actual functional or unit test case, you could simply load them in the proper order, but I''m not doing any tests yet, but simply using the fixture data for development purposes. Either there is a major loophole in this process, or, I''m totally approaching this wrong. I''m voting for the latter :) _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060223/d67637da/attachment-0001.html
Yeah, I was so hoping someone had already done this :) My situation is, I don''t actually "have" any development data yet. Without running test suites, I''m wanting to populate the test or development database with *valid* fixture data. Hrmmm.... Thanks for that link btw ! On 2/23/06, Hogan, Brian P. <HOGANBP@uwec.edu> wrote:> > Boy that would be cool. Right now I just dump my development database to > fixtures using the great plugin from here: > > > http://nubyonrails.com/articles/2005/12/27/dump-or-slurp-yaml-reference-data > > Quite a time-saver. > > > -----Original Message----- > *From:* rails-bounces@lists.rubyonrails.org [mailto: > rails-bounces@lists.rubyonrails.org] *On Behalf Of *Dylan Stamat > *Sent:* Thursday, February 23, 2006 12:29 PM > *To:* rails@lists.rubyonrails.org > *Subject:* Re: [Rails] Re: Fixtures and Relationships > > +1 on what Brian said. > > Now, is there a way to ensure the foreign keys you populate are valid ? > ie... use ActiveRecord within the YAML to get some relevant data ? For > example, consider this setup: > > ========================> create_table "cats", :force => true do |t| > t.column "hair", :string > end > > create_table "dogs", :force => true do |t| > t.column "legs, :string > end > > create_table "vets", :force => true do |t| > t.column "cats_id", :integer > t.column "dogs_id", :integer > t.column "dr_name", :string > end > ========================> > I load my fixtures in the proper order, :cats, :dogs, :vets > The cats and dog tables are now populated with valid data. > > Now, within my vets fixture, I want to create a bunch of test vets, but > want to ensure the foreign > keys are populated with valid cat and dog ids. I tried the following, but > it complains about > the @cats being nil. I''m assuming AR isn''t available here, or... err, I''m > not sure: > > vets.yml > =========================> <% > @cats = Cat.find(:all) > @dogs = Dog.find(:all) > %> > <% 1.upto(40) do |i| %> > vet_<%= i %>: > cat_id: <%= rand(@cats.length + 1) %> > dog_id: <%= rand(@dogs.length + 1) %> > dr_name: blah > <% end %> > =========================> > No dice. Any insight on how to accomplish this would be greatly > appreciated ! > => Dylan > > On 2/23/06, Hogan, Brian P. < HOGANBP@uwec.edu> wrote: > > > > if you need a certain order, you might handle that with your object > > calls.... like has_many :order and such. I would never rely on my items to > > be in a specific order in the database. Just my .02 > > > > -----Original Message----- > > *From:* rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] > > *On Behalf Of *Zack Chandler > > *Sent:* Thursday, February 23, 2006 10:41 AM > > *To:* rails@lists.rubyonrails.org > > *Subject:* Re: [Rails] Re: Fixtures and Relationships > > > > I had a related question... Does anyone know how to have the elements > > inside the fixtures loaded in order. I want to guarantee that the items in > > the yml fixture file get loaded in order (see below - item1 loaded before > > item2) > > > > item1: > > value: > > > > item2 > > value: > > > > Thanks, > > Zack > > > > On 2/22/06, Dylan Stamat <dylans@gmail.com > wrote: > > > > > > Found the answer, albeit, it would be nice if this feature existed > > > natively within Rails :) > > > http://kekova.ca/articles/2005/12/31/loading-your-test-db-to-your-development-db > > > > > > > > > Thanks Chris ! > > > > > > > > > > > > On 2/22/06, Dylan Stamat < dylans@gmail.com> wrote: > > > > > > > > In my daily development, I migrate back and forth between versions, > > > > and often do: rake load_fixtures... > > > > ... in order to populate my development database with fun data. > > > > > > > > Now, with any HABTM relationship, there are failures, as there is no > > > > way to say "which" fixtures to load first. > > > > > > > > Within an actual functional or unit test case, you could simply load > > > > them in the proper order, but I''m not doing any tests yet, but simply using > > > > the fixture data for development purposes. > > > > > > > > Either there is a major loophole in this process, or, I''m totally > > > > approaching this wrong. I''m voting for the latter :) > > > > > > > > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060223/087a6f86/attachment.html
Usually what I do is get the migration done, get the models built, and then open up Console and enter some records that way. (I don''t include validations in the models at this point but I do make the model associations). That way I can create users, their addresses, their tasks, etc... and know that I have data that will relate. Then I just use the below plugin to dump it out. not quite like what you''re looking for but I hope it helps. -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Dylan Stamat Sent: Thursday, February 23, 2006 12:54 PM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Re: Fixtures and Relationships Yeah, I was so hoping someone had already done this :) My situation is, I don''t actually "have" any development data yet. Without running test suites, I''m wanting to populate the test or development database with *valid* fixture data. Hrmmm.... Thanks for that link btw ! On 2/23/06, Hogan, Brian P. <HOGANBP@uwec.edu> wrote: Boy that would be cool. Right now I just dump my development database to fixtures using the great plugin from here: http://nubyonrails.com/articles/2005/12/27/dump-or-slurp-yaml-reference- data Quite a time-saver. -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto: rails-bounces@lists.rubyonrails.org <mailto:rails-bounces@lists.rubyonrails.org> ] On Behalf Of Dylan Stamat Sent: Thursday, February 23, 2006 12:29 PM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Re: Fixtures and Relationships +1 on what Brian said. Now, is there a way to ensure the foreign keys you populate are valid ? ie... use ActiveRecord within the YAML to get some relevant data ? For example, consider this setup: ========================= create_table "cats", :force => true do |t| t.column "hair", :string end create_table "dogs", :force => true do |t| t.column "legs, :string end create_table "vets", :force => true do |t| t.column "cats_id", :integer t.column "dogs_id", :integer t.column "dr_name", :string end ======================== I load my fixtures in the proper order, :cats, :dogs, :vets The cats and dog tables are now populated with valid data. Now, within my vets fixture, I want to create a bunch of test vets, but want to ensure the foreign keys are populated with valid cat and dog ids. I tried the following, but it complains about the @cats being nil. I''m assuming AR isn''t available here, or... err, I''m not sure: vets.yml ========================= <% @cats = Cat.find(:all) @dogs = Dog.find(:all) %> <% 1.upto(40) do |i| %> vet_<%= i %>: cat_id: <%= rand(@cats.length + 1) %> dog_id: <%= rand(@dogs.length + 1) %> dr_name: blah <% end %> ========================= No dice. Any insight on how to accomplish this would be greatly appreciated ! = Dylan On 2/23/06, Hogan, Brian P. < HOGANBP@uwec.edu <mailto:HOGANBP@uwec.edu> > wrote: if you need a certain order, you might handle that with your object calls.... like has_many :order and such. I would never rely on my items to be in a specific order in the database. Just my .02 -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto: rails-bounces@lists.rubyonrails.org <mailto:rails-bounces@lists.rubyonrails.org> ] On Behalf Of Zack Chandler Sent: Thursday, February 23, 2006 10:41 AM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Re: Fixtures and Relationships I had a related question... Does anyone know how to have the elements inside the fixtures loaded in order. I want to guarantee that the items in the yml fixture file get loaded in order (see below - item1 loaded before item2) item1: value: item2 value: Thanks, Zack On 2/22/06, Dylan Stamat <dylans@gmail.com > wrote: Found the answer, albeit, it would be nice if this feature existed natively within Rails :) http://kekova.ca/articles/2005/12/31/loading-your-test-db-to-your-develo pment-db Thanks Chris ! On 2/22/06, Dylan Stamat < dylans@gmail.com <mailto:dylans@gmail.com> > wrote: In my daily development, I migrate back and forth between versions, and often do: rake load_fixtures... ... in order to populate my development database with fun data. Now, with any HABTM relationship, there are failures, as there is no way to say "which" fixtures to load first. Within an actual functional or unit test case, you could simply load them in the proper order, but I''m not doing any tests yet, but simply using the fixture data for development purposes. Either there is a major loophole in this process, or, I''m totally approaching this wrong. I''m voting for the latter :) _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060223/582e4520/attachment.html
Ahh... that''s a great way to do it ! Thanks Brian :) On 2/23/06, Hogan, Brian P. <HOGANBP@uwec.edu> wrote:> > Usually what I do is get the migration done, get the models built, and > then open up Console and enter some records that way. (I don''t include > validations in the models at this point but I do make the model > associations). That way I can create users, their addresses, their tasks, > etc... and know that I have data that will relate. Then I just use the below > plugin to dump it out. > > not quite like what you''re looking for but I hope it helps. > > > -----Original Message----- > *From:* rails-bounces@lists.rubyonrails.org [mailto: > rails-bounces@lists.rubyonrails.org] *On Behalf Of *Dylan Stamat > *Sent:* Thursday, February 23, 2006 12:54 PM > *To:* rails@lists.rubyonrails.org > *Subject:* Re: [Rails] Re: Fixtures and Relationships > > Yeah, I was so hoping someone had already done this :) > > My situation is, I don''t actually "have" any development data yet. > Without running test suites, I''m wanting to populate the test or > development database with *valid* fixture data. > Hrmmm.... > > Thanks for that link btw ! > > > On 2/23/06, Hogan, Brian P. <HOGANBP@uwec.edu> wrote: > > > > Boy that would be cool. Right now I just dump my development database to > > fixtures using the great plugin from here: > > > > http://nubyonrails.com/articles/2005/12/27/dump-or-slurp-yaml-reference-data > > > > > > Quite a time-saver. > > > > > > -----Original Message----- > > *From:* rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] > > *On Behalf Of *Dylan Stamat > > *Sent:* Thursday, February 23, 2006 12:29 PM > > *To:* rails@lists.rubyonrails.org > > *Subject:* Re: [Rails] Re: Fixtures and Relationships > > > > +1 on what Brian said. > > > > Now, is there a way to ensure the foreign keys you populate are valid ? > > ie... use ActiveRecord within the YAML to get some relevant data ? For > > example, consider this setup: > > > > ========================> > create_table "cats", :force => true do |t| > > t.column "hair", :string > > end > > > > create_table "dogs", :force => true do |t| > > t.column "legs, :string > > end > > > > create_table "vets", :force => true do |t| > > t.column "cats_id", :integer > > t.column "dogs_id", :integer > > t.column "dr_name", :string > > end > > ========================> > > > I load my fixtures in the proper order, :cats, :dogs, :vets > > The cats and dog tables are now populated with valid data. > > > > Now, within my vets fixture, I want to create a bunch of test vets, but > > want to ensure the foreign > > keys are populated with valid cat and dog ids. I tried the following, > > but it complains about > > the @cats being nil. I''m assuming AR isn''t available here, or... err, > > I''m not sure: > > > > vets.yml > > =========================> > <% > > @cats = Cat.find(:all) > > @dogs = Dog.find(:all) > > %> > > <% 1.upto(40) do |i| %> > > vet_<%= i %>: > > cat_id: <%= rand(@cats.length + 1) %> > > dog_id: <%= rand(@dogs.length + 1) %> > > dr_name: blah > > <% end %> > > =========================> > > > No dice. Any insight on how to accomplish this would be greatly > > appreciated ! > > => > Dylan > > > > On 2/23/06, Hogan, Brian P. < HOGANBP@uwec.edu> wrote: > > > > > > if you need a certain order, you might handle that with your object > > > calls.... like has_many :order and such. I would never rely on my items to > > > be in a specific order in the database. Just my .02 > > > > > > -----Original Message----- > > > *From:* rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] > > > *On Behalf Of *Zack Chandler > > > *Sent:* Thursday, February 23, 2006 10:41 AM > > > *To:* rails@lists.rubyonrails.org > > > *Subject:* Re: [Rails] Re: Fixtures and Relationships > > > > > > I had a related question... Does anyone know how to have the elements > > > inside the fixtures loaded in order. I want to guarantee that the items in > > > the yml fixture file get loaded in order (see below - item1 loaded before > > > item2) > > > > > > item1: > > > value: > > > > > > item2 > > > value: > > > > > > Thanks, > > > Zack > > > > > > On 2/22/06, Dylan Stamat <dylans@gmail.com > wrote: > > > > > > > > Found the answer, albeit, it would be nice if this feature existed > > > > natively within Rails :) > > > > http://kekova.ca/articles/2005/12/31/loading-your-test-db-to-your-development-db > > > > > > > > > > > > Thanks Chris ! > > > > > > > > > > > > > > > > On 2/22/06, Dylan Stamat < dylans@gmail.com> wrote: > > > > > > > > > > In my daily development, I migrate back and forth between > > > > > versions, and often do: rake load_fixtures... > > > > > ... in order to populate my development database with fun data. > > > > > > > > > > Now, with any HABTM relationship, there are failures, as there is > > > > > no way to say "which" fixtures to load first. > > > > > > > > > > Within an actual functional or unit test case, you could simply > > > > > load them in the proper order, but I''m not doing any tests yet, but simply > > > > > using the fixture data for development purposes. > > > > > > > > > > Either there is a major loophole in this process, or, I''m totally > > > > > approaching this wrong. I''m voting for the latter :) > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rails mailing list > > > > Rails@lists.rubyonrails.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060223/69329d35/attachment.html
Brian, The need is simply to correctly set up belongs_to relationships specified in other yml file correctly. For example take the following: --- users.yml --- <% screen_names = [ ''foo'', ''bar'', ''foobar'' ] %> <% screen_names.each do |name| %> <%= name %>: username: <%= name %> hashed_password: 12345 salt: 12345 screen_name: <%= name %> email_address: <%= name %>@gmail.com <% end %> The data is loaded fine but foo is not loaded first as you would expect. Later I load the fixture posts.yml which is a belongs_to :user. Unfortunately the record does not link to foo as you would expect. I have seen references to ordered yaml (http://yaml.org/type/omap.html) but don''t understand yet how or if that can be used. BTW, this is purely to setup the db for testing. Any ideas? Zack On 2/23/06, Hogan, Brian P. <HOGANBP@uwec.edu> wrote:> > if you need a certain order, you might handle that with your object > calls.... like has_many :order and such. I would never rely on my items to > be in a specific order in the database. Just my .02 > > -----Original Message----- > *From:* rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] > *On Behalf Of *Zack Chandler > *Sent:* Thursday, February 23, 2006 10:41 AM > *To:* rails@lists.rubyonrails.org > *Subject:* Re: [Rails] Re: Fixtures and Relationships > > I had a related question... Does anyone know how to have the elements > inside the fixtures loaded in order. I want to guarantee that the items in > the yml fixture file get loaded in order (see below - item1 loaded before > item2) > > item1: > value: > > item2 > value: > > Thanks, > Zack > > On 2/22/06, Dylan Stamat <dylans@gmail.com > wrote: > > > > Found the answer, albeit, it would be nice if this feature existed > > natively within Rails :) > > http://kekova.ca/articles/2005/12/31/loading-your-test-db-to-your-development-db > > > > > > Thanks Chris ! > > > > > > > > On 2/22/06, Dylan Stamat < dylans@gmail.com> wrote: > > > > > > In my daily development, I migrate back and forth between versions, > > > and often do: rake load_fixtures... > > > ... in order to populate my development database with fun data. > > > > > > Now, with any HABTM relationship, there are failures, as there is no > > > way to say "which" fixtures to load first. > > > > > > Within an actual functional or unit test case, you could simply load > > > them in the proper order, but I''m not doing any tests yet, but simply using > > > the fixture data for development purposes. > > > > > > Either there is a major loophole in this process, or, I''m totally > > > approaching this wrong. I''m voting for the latter :) > > > > > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060223/d91c95ab/attachment-0001.html
Gotcha. That makes total sense. It also makes sense because the yml probably comes from a hash, and hashes aren''t ordered. I think you''re in trouble! :) May need to take a different approach like the one I suggested, and maybe make one script that builds your test dataset for you before dumping it to fixtures. Interesting though.... never thought about that. -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Zack Chandler Sent: Thursday, February 23, 2006 2:08 PM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Re: Fixtures and Relationships Brian, The need is simply to correctly set up belongs_to relationships specified in other yml file correctly. For example take the following: --- users.yml --- <% screen_names = [ ''foo'', ''bar'', ''foobar'' ] %> <% screen_names.each do |name| %> <%= name %>: username: <%= name %> hashed_password: 12345 salt: 12345 screen_name: <%= name %> email_address: <%= name %>@ gmail.com <http://gmail.com/> <% end %> The data is loaded fine but foo is not loaded first as you would expect. Later I load the fixture posts.yml which is a belongs_to :user. Unfortunately the record does not link to foo as you would expect. I have seen references to ordered yaml (http://yaml.org/type/omap.html ) but don''t understand yet how or if that can be used. BTW, this is purely to setup the db for testing. Any ideas? Zack On 2/23/06, Hogan, Brian P. <HOGANBP@uwec.edu> wrote: if you need a certain order, you might handle that with your object calls.... like has_many :order and such. I would never rely on my items to be in a specific order in the database. Just my .02 -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto: rails-bounces@lists.rubyonrails.org <mailto:rails-bounces@lists.rubyonrails.org> ] On Behalf Of Zack Chandler Sent: Thursday, February 23, 2006 10:41 AM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Re: Fixtures and Relationships I had a related question... Does anyone know how to have the elements inside the fixtures loaded in order. I want to guarantee that the items in the yml fixture file get loaded in order (see below - item1 loaded before item2) item1: value: item2 value: Thanks, Zack On 2/22/06, Dylan Stamat <dylans@gmail.com > wrote: Found the answer, albeit, it would be nice if this feature existed natively within Rails :) http://kekova.ca/articles/2005/12/31/loading-your-test-db-to-your-develo pment-db Thanks Chris ! On 2/22/06, Dylan Stamat < dylans@gmail.com <mailto:dylans@gmail.com> > wrote: In my daily development, I migrate back and forth between versions, and often do: rake load_fixtures... ... in order to populate my development database with fun data. Now, with any HABTM relationship, there are failures, as there is no way to say "which" fixtures to load first. Within an actual functional or unit test case, you could simply load them in the proper order, but I''m not doing any tests yet, but simply using the fixture data for development purposes. Either there is a major loophole in this process, or, I''m totally approaching this wrong. I''m voting for the latter :) _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060223/b52dd393/attachment-0001.html
Having recently had a solution to this issue presented to me by a coworker, I''m happy to help out and point how to get fixture rows loaded in a particular order when running tests. This proves useful especially for tree data structures. It may not necessarily be the answer to the question you were asking, but it''s useful knowledge nonetheless. http://api.rubyonrails.org/classes/Fixtures.html details how to set up your YAML file to order the database rows you''ve defined using an Omap. While the documentation for both omap and the fixtures here leaves something to be desired, essentially you can setup a YAML file thus: --- !omap - parent: id: 1 -descendent id: 2 parent_id: 1 -another id: 3 parent_id: 2 This will ensure that the database rows are loaded into the test database in exactly this order. Hope this helps you out. D. Taylor Singletary, Reality Technician. On 2/23/06, Hogan, Brian P. <HOGANBP@uwec.edu> wrote:> > Gotcha. That makes total sense. It also makes sense because the yml > probably comes from a hash, and hashes aren''t ordered. I think you''re in > trouble! :) > > May need to take a different approach like the one I suggested, and maybe > make one script that builds your test dataset for you before dumping it to > fixtures. > > Interesting though.... never thought about that. > > -----Original Message----- > *From:* rails-bounces@lists.rubyonrails.org [mailto: > rails-bounces@lists.rubyonrails.org] *On Behalf Of *Zack Chandler > *Sent:* Thursday, February 23, 2006 2:08 PM > *To:* rails@lists.rubyonrails.org > *Subject:* Re: [Rails] Re: Fixtures and Relationships > > Brian, > The need is simply to correctly set up belongs_to relationships > specified in other yml file correctly. For example take the following: > > --- users.yml --- > <% screen_names = [ ''foo'', ''bar'', ''foobar'' ] %> > > <% screen_names.each do |name| %> > > <%= name %>: > username: <%= name %> > hashed_password: 12345 > salt: 12345 > screen_name: <%= name %> > email_address: <%= name %>@ > gmail.com > <% end %> > > > The data is loaded fine but foo is not loaded first as you would expect. > > Later I load the fixture posts.yml which is a belongs_to :user. Unfortunately > the record does not link to foo as you would expect. > I have seen references to ordered yaml (http://yaml.org/type/omap.html > ) but > don''t understand yet how or if that can be used. > > BTW, this is purely to setup the db for testing. > > Any ideas? > > Zack > > On 2/23/06, Hogan, Brian P. <HOGANBP@uwec.edu> wrote: > > > > if you need a certain order, you might handle that with your object > > calls.... like has_many :order and such. I would never rely on my items to > > be in a specific order in the database. Just my .02 > > > > -----Original Message----- > > *From:* rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] > > *On Behalf Of *Zack Chandler > > *Sent:* Thursday, February 23, 2006 10:41 AM > > *To:* rails@lists.rubyonrails.org > > *Subject:* Re: [Rails] Re: Fixtures and Relationships > > > > I had a related question... Does anyone know how to have the elements > > inside the fixtures loaded in order. I want to guarantee that the items in > > the yml fixture file get loaded in order (see below - item1 loaded before > > item2) > > > > item1: > > value: > > > > item2 > > value: > > > > Thanks, > > Zack > > > > On 2/22/06, Dylan Stamat <dylans@gmail.com > wrote: > > > > > > Found the answer, albeit, it would be nice if this feature existed > > > natively within Rails :) > > > http://kekova.ca/articles/2005/12/31/loading-your-test-db-to-your-development-db > > > > > > > > > Thanks Chris ! > > > > > > > > > > > > On 2/22/06, Dylan Stamat < dylans@gmail.com> wrote: > > > > > > > > In my daily development, I migrate back and forth between versions, > > > > and often do: rake load_fixtures... > > > > ... in order to populate my development database with fun data. > > > > > > > > Now, with any HABTM relationship, there are failures, as there is no > > > > way to say "which" fixtures to load first. > > > > > > > > Within an actual functional or unit test case, you could simply load > > > > them in the proper order, but I''m not doing any tests yet, but simply using > > > > the fixture data for development purposes. > > > > > > > > Either there is a major loophole in this process, or, I''m totally > > > > approaching this wrong. I''m voting for the latter :) > > > > > > > > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060223/9f653f5c/attachment-0001.html
An omap is essentially an ordered hash in yaml if that helps. -Ezra On Feb 23, 2006, at 12:54 PM, D. Taylor Singletary wrote:> Having recently had a solution to this issue presented to me by a > coworker, I''m happy to help out and point how to get fixture rows > loaded in a particular order when running tests. This proves useful > especially for tree data structures. It may not necessarily be the > answer to the question you were asking, but it''s useful knowledge > nonetheless. > > http://api.rubyonrails.org/classes/Fixtures.html details how to set > up your YAML file to order the database rows you''ve defined using > an Omap. While the documentation for both omap and the fixtures > here leaves something to be desired, essentially you can setup a > YAML file thus: > > --- !omap > - parent: > id: 1 > -descendent > id: 2 > parent_id: 1 > -another > id: 3 > parent_id: 2 > > This will ensure that the database rows are loaded into the test > database in exactly this order. > > Hope this helps you out. > > D. Taylor Singletary, > Reality Technician. > > On 2/23/06, Hogan, Brian P. < HOGANBP@uwec.edu> wrote: > Gotcha. That makes total sense. It also makes sense because the yml > probably comes from a hash, and hashes aren''t ordered. I think > you''re in trouble! :) > > May need to take a different approach like the one I suggested, and > maybe make one script that builds your test dataset for you before > dumping it to fixtures. > > Interesting though.... never thought about that. > > -----Original Message----- > From: rails-bounces@lists.rubyonrails.org [mailto: rails- > bounces@lists.rubyonrails.org] On Behalf Of Zack Chandler > Sent: Thursday, February 23, 2006 2:08 PM > To: rails@lists.rubyonrails.org > Subject: Re: [Rails] Re: Fixtures and Relationships > > Brian, > The need is simply to correctly set up belongs_to relationships > specified in other yml file correctly. For example take the > following: > --- users.yml --- > > > > > : > username: > > hashed_password: 12345 > salt: 12345 > screen_name: > email_address: @ > > gmail.com > > > > The data is loaded fine but foo is not loaded first as you would > expect. > > Later I load the fixture posts.yml which is a belongs_to :user. > Unfortunately > the record does not link to foo as you would expect. > I have seen references to ordered yaml ( > http://yaml.org/type/omap.html > ) but > don''t understand yet how or if that can be used. > > BTW, this is purely to setup the db for testing. > > Any ideas? > Zack > > On 2/23/06, Hogan, Brian P. <HOGANBP@uwec.edu> wrote: > if you need a certain order, you might handle that with your > object calls.... like has_many :order and such. I would never rely > on my items to be in a specific order in the database. Just my .02 > > -----Original Message----- > From: rails-bounces@lists.rubyonrails.org [mailto: rails- > bounces@lists.rubyonrails.org] On Behalf Of Zack Chandler > Sent: Thursday, February 23, 2006 10:41 AM > To: rails@lists.rubyonrails.org > Subject: Re: [Rails] Re: Fixtures and Relationships > > I had a related question... Does anyone know how to have the > elements inside the fixtures loaded in order. I want to guarantee > that the items in the yml fixture file get loaded in order (see > below - item1 loaded before item2) > > item1: > value: > > item2 > value: > > Thanks, > Zack > > On 2/22/06, Dylan Stamat <dylans@gmail.com > wrote: > Found the answer, albeit, it would be nice if this feature existed > natively within Rails :) > http://kekova.ca/articles/2005/12/31/loading-your-test-db-to-your- > development-db > > Thanks Chris ! > > > > > On 2/22/06, Dylan Stamat < dylans@gmail.com> wrote: > In my daily development, I migrate back and forth between versions, > and often do: rake load_fixtures... > ... in order to populate my development database with fun data. > > Now, with any HABTM relationship, there are failures, as there is > no way to say "which" fixtures to load first. > > Within an actual functional or unit test case, you could simply > load them in the proper order, but I''m not doing any tests yet, but > simply using the fixture data for development purposes. > > Either there is a major loophole in this process, or, I''m totally > approaching this wrong. I''m voting for the latter :) > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060223/d7de78c4/attachment.html
Taylor, Ezra, Thanks for your help. I feel like I''m really close and must have one small typo/misunderstanding. I''ve tried !omap and this is the error I receive: rake aborted! a YAML error occured parsing test/fixtures/users.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Please have a look at http://www.yaml.org/faq.html The exact error was: YAML::Error: Invalid !omap: {"-nikki"=>{"salt"=>245481, "hashed_password"=>426 065, "username"=>"nikki", "screen_name"=>"nikki", "email_address"=>" nikki@gmail. com"}, "-honemaster"=>{"salt"=>24598, "hashed_password"=>814677, "username"=>"ho nemaster", "screen_name"=>"honemaster", "email_address"=>" honemaster@gmail.com"} , "-hansgouer"=>{"salt"=>631182, "hashed_password"=>328485, "username"=>"hansgou er", "screen_name"=>"hansgouer", "email_address"=>"hansgouer@gmail.com"}, "-kilt erman"=>{"salt"=>948687, "hashed_password"=>287631, "username"=>"kilterman", "sc reen_name"=>"kilterman", "email_address"=>"kilterman@gmail.com"}, "-zenman"=>{"s alt"=>194883, "hashed_password"=>736319, "username"=>"zenman", "screen_name"=>"z enman", "email_address"=>"zenman@gmail.com"}, "-rawfingers"=>{"salt"=>342450, "h ashed_password"=>855412, "username"=>"rawfingers", "screen_name"=>"rawfingers", "email_address"=>"rawfingers@gmail.com"}, "-herro"=>{"salt"=>976814, "hashed_pas sword"=>158429, "username"=>"herro", "screen_name"=>"herro", "email_address"=>"h erro@gmail.com"}, "-gymrat"=>{"salt"=>981951, "hashed_password"=>987702, "userna me"=>"gymrat", "screen_name"=>"gymrat", "email_address"=>"gymrat@gmail.com"}, "- roo"=>{"salt"=>878098, "hashed_password"=>843882, "username"=>"roo", "screen_nam e"=>"roo", "email_address"=>"roo@gmail.com"}, "-dresserlan"=>{"salt"=>832618, "h ashed_password"=>22106, "username"=>"dresserlan", "screen_name"=>"dresserlan", " email_address"=>"dresserlan@gmail.com"}, "-nickta"=>{"salt"=>256946, "hashed_pas sword"=>29039, "username"=>"nickta", "screen_name"=>"nickta", "email_address"=>" nickta@gmail.com"}, "-jason"=>{"salt"=>541275, "hashed_password"=>141391, "usern ame"=>"jason", "screen_name"=>"jason", "email_address"=>"jason@gmail.com"}, "-be autygirl"=>{"salt"=>554156, "hashed_password"=>57327, "username"=>"beautygirl", "screen_name"=>"beautygirl", "email_address"=>"beautygirl@gmail.com"}} Here is my fixture... am I missing something??? <% screen_names = [ ''nickta'', ''herro'', ''hansgouer'', ''kilterman'', ''zenman'', ''honemaster'', ''rawfingers'', ''gymrat'', ''beautygirl'', ''nikki'', ''jason'', ''roo'', ''dresserlan'' ] %> --- !omap <% screen_names.each do |name| %> -<%= name %>: username: <%= name %> hashed_password: <%= rand(1000000) %> salt: <%= rand(1000000) %> screen_name: <%= name %> email_address: <%= name %>@gmail.com <% end %> Thanks, Zack On 2/23/06, Ezra Zygmuntowicz <ezra@yakimaherald.com> wrote:> > An omap is essentially an ordered hash in yaml if that helps. > -Ezra > > On Feb 23, 2006, at 12:54 PM, D. Taylor Singletary wrote: > > Having recently had a solution to this issue presented to me by a > coworker, I''m happy to help out and point how to get fixture rows loaded in > a particular order when running tests. This proves useful especially for > tree data structures. It may not necessarily be the answer to the question > you were asking, but it''s useful knowledge nonetheless. > > http://api.rubyonrails.org/classes/Fixtures.html details how to set up > your YAML file to order the database rows you''ve defined using an Omap. > While the documentation for both omap and the fixtures here leaves something > to be desired, essentially you can setup a YAML file thus: > > --- !omap > - parent: > id: 1 > -descendent > id: 2 > parent_id: 1 > -another > id: 3 > parent_id: 2 > > This will ensure that the database rows are loaded into the test database > in exactly this order. > > Hope this helps you out. > > D. Taylor Singletary, > Reality Technician. > > On 2/23/06, Hogan, Brian P. < HOGANBP@uwec.edu> wrote: > > > Gotcha. That makes total sense. It also makes sense because the yml > > probably comes from a hash, and hashes aren''t ordered. I think you''re in > > trouble! :) > > > > May need to take a different approach like the one I suggested, and > > maybe make one script that builds your test dataset for you before dumping > > it to fixtures. > > > > Interesting though.... never thought about that. > > > > -----Original Message----- > > *From:* rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] > > *On Behalf Of *Zack Chandler > > *Sent:* Thursday, February 23, 2006 2:08 PM > > *To:* rails@lists.rubyonrails.org > > *Subject:* Re: [Rails] Re: Fixtures and Relationships > > > > Brian, > > The need is simply to correctly set up belongs_to relationships > > specified in other yml file correctly. For example take the following: > > > > --- users.yml --- > > > > > > > > > > : > > username: > > > > hashed_password: 12345 > > salt: 12345 > > screen_name: > > email_address: @ > > > > gmail.com > > > > > > > > The data is loaded fine but foo is not loaded first as you would expect. > > > > Later I load the fixture posts.yml which is a belongs_to :user. Unfortunately > > the record does not link to foo as you would expect. > > I have seen references to ordered yaml ( > > http://yaml.org/type/omap.html > > ) but > > don''t understand yet how or if that can be used. > > > > BTW, this is purely to setup the db for testing. > > > > Any ideas? > > > > Zack > > > > On 2/23/06, Hogan, Brian P. <HOGANBP@uwec.edu> wrote: > > > > > > if you need a certain order, you might handle that with your object > > > calls.... like has_many :order and such. I would never rely on my items to > > > be in a specific order in the database. Just my .02 > > > > > > -----Original Message----- > > > *From:* rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] > > > *On Behalf Of *Zack Chandler > > > *Sent:* Thursday, February 23, 2006 10:41 AM > > > *To:* rails@lists.rubyonrails.org > > > *Subject:* Re: [Rails] Re: Fixtures and Relationships > > > > > > I had a related question... Does anyone know how to have the elements > > > inside the fixtures loaded in order. I want to guarantee that the items in > > > the yml fixture file get loaded in order (see below - item1 loaded before > > > item2) > > > > > > item1: > > > value: > > > > > > item2 > > > value: > > > > > > Thanks, > > > Zack > > > > > > On 2/22/06, Dylan Stamat <dylans@gmail.com > wrote: > > > > > > > > Found the answer, albeit, it would be nice if this feature existed > > > > natively within Rails :) > > > > http://kekova.ca/articles/2005/12/31/loading-your-test-db-to-your-development-db > > > > > > > > > > > > Thanks Chris ! > > > > > > > > > > > > > > > > On 2/22/06, Dylan Stamat < dylans@gmail.com> wrote: > > > > > > > > > > In my daily development, I migrate back and forth between > > > > > versions, and often do: rake load_fixtures... > > > > > ... in order to populate my development database with fun data. > > > > > > > > > > Now, with any HABTM relationship, there are failures, as there is > > > > > no way to say "which" fixtures to load first. > > > > > > > > > > Within an actual functional or unit test case, you could simply > > > > > load them in the proper order, but I''m not doing any tests yet, but simply > > > > > using the fixture data for development purposes. > > > > > > > > > > Either there is a major loophole in this process, or, I''m totally > > > > > approaching this wrong. I''m voting for the latter :) > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rails mailing list > > > > Rails@lists.rubyonrails.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060224/2401856f/attachment-0001.html
I''m not sure if this is your problem, but it might be. YAML files are pretty sensitive to whitespace versus tabs, and it may behoove you to keep the file pretty clean of excess spaces by ending your non-content generating erb calls with a - character, which stops them from producing a line break after they''ve been processed. So for the ones that don''t start with <%= ... %> try it like: <% screen_names.each do |name| -%> (notice the "-" prior to the %> ) Also, make sure you are using two spaces rather than a tab character for your field definitions. Also, make sure there is a space between your "-" character prior to the "record name" definition.. When I succesfully got omap to work today, I increased my "soft tab width" to match towards the extra characters generated by the "-" in the "named record" area... so if I were to do what you''re doing, I would have done it like this (though I haven''t tested your particular example): <% screen_names = [ ''nickta'', ''herro'', ''hansgouer'', ''kilterman'', ''zenman'', ''honemaster'', ''rawfingers'', ''gymrat'', ''beautygirl'', ''nikki'', ''jason'', ''roo'', ''dresserlan'' ] -%> --- !omap <% screen_names.each do |name| -%> - <%= name %>: username: <%= name %> hashed_password: <%= rand(1000000) %> salt: <%= rand(1000000) %> screen_name: <%= name %> email_address: <%= name %>@gmail.com <% end %-> D. Taylor Singletary, Reality Technician On 2/23/06, Zack Chandler <zackchandler@gmail.com> wrote:> > Taylor, Ezra, > Thanks for your help. I feel like I''m really close and must have one > small typo/misunderstanding. I''ve tried !omap and this is the error I > receive: > > rake aborted! > a YAML error occured parsing test/fixtures/users.yml. Please note that > YAML must > be consistently indented using spaces. Tabs are not allowed. Please have > a look > at http://www.yaml.org/faq.html > The exact error was: > YAML::Error: Invalid !omap: {"-nikki"=>{"salt"=>245481, > "hashed_password"=>426 > 065, "username"=>"nikki", "screen_name"=>"nikki", "email_address"=>" > nikki@gmail. > com"}, "-honemaster"=>{"salt"=>24598, "hashed_password"=>814677, > "username"=>"ho > nemaster", "screen_name"=>"honemaster", "email_address"=>" > honemaster@gmail.com"} > , "-hansgouer"=>{"salt"=>631182, "hashed_password"=>328485, > "username"=>"hansgou > er", "screen_name"=>"hansgouer", "email_address"=>"hansgouer@gmail.com"}, > "-kilt > erman"=>{"salt"=>948687, "hashed_password"=>287631, > "username"=>"kilterman", "sc > reen_name"=>"kilterman", "email_address"=>"kilterman@gmail.com"}, > "-zenman"=>{"s > alt"=>194883, "hashed_password"=>736319, "username"=>"zenman", > "screen_name"=>"z > enman", "email_address"=>"zenman@gmail.com"}, > "-rawfingers"=>{"salt"=>342450, "h > ashed_password"=>855412, "username"=>"rawfingers", > "screen_name"=>"rawfingers", > "email_address"=>"rawfingers@gmail.com"}, "-herro"=>{"salt"=>976814, > "hashed_pas > sword"=>158429, "username"=>"herro", "screen_name"=>"herro", > "email_address"=>"h > erro@gmail.com"}, "-gymrat"=>{"salt"=>981951, "hashed_password"=>987702, > "userna > me"=>"gymrat", "screen_name"=>"gymrat", "email_address"=>" > gymrat@gmail.com"}, "- > roo"=>{"salt"=>878098, "hashed_password"=>843882, "username"=>"roo", > "screen_nam > e"=>"roo", "email_address"=>" roo@gmail.com"}, > "-dresserlan"=>{"salt"=>832618, "h > ashed_password"=>22106, "username"=>"dresserlan", > "screen_name"=>"dresserlan", " > email_address"=>"dresserlan@gmail.com"}, "-nickta"=>{"salt"=>256946, > "hashed_pas > sword"=>29039, "username"=>"nickta", "screen_name"=>"nickta", > "email_address"=>" > nickta@gmail.com"}, "-jason"=>{"salt"=>541275, "hashed_password"=>141391, > "usern > ame"=>"jason", "screen_name"=>"jason", "email_address"=>" jason@gmail.com"}, > "-be > autygirl"=>{"salt"=>554156, "hashed_password"=>57327, > "username"=>"beautygirl", > "screen_name"=>"beautygirl", "email_address"=>" beautygirl@gmail.com"}} > > Here is my fixture... am I missing something??? > > <% > screen_names = [ > ''nickta'', ''herro'', ''hansgouer'', ''kilterman'', ''zenman'', ''honemaster'', > > ''rawfingers'', ''gymrat'', ''beautygirl'', ''nikki'', ''jason'', ''roo'', > ''dresserlan'' > ] > %> > --- !omap > <% screen_names.each do |name| %> > -<%= name %>: > username: <%= name %> > hashed_password: <%= rand(1000000) %> > salt: <%= rand(1000000) %> > screen_name: <%= name %> > email_address: <%= name %>@gmail.com > <% end %> > > Thanks, > Zack > > On 2/23/06, Ezra Zygmuntowicz <ezra@yakimaherald.com> wrote: > > > > An omap is essentially an ordered hash in yaml if that helps. > > -Ezra > > > > On Feb 23, 2006, at 12:54 PM, D. Taylor Singletary wrote: > > > > Having recently had a solution to this issue presented to me by a > > coworker, I''m happy to help out and point how to get fixture rows loaded in > > a particular order when running tests. This proves useful especially for > > tree data structures. It may not necessarily be the answer to the question > > you were asking, but it''s useful knowledge nonetheless. > > > > http://api.rubyonrails.org/classes/Fixtures.html details how to set up > > your YAML file to order the database rows you''ve defined using an Omap. > > While the documentation for both omap and the fixtures here leaves something > > to be desired, essentially you can setup a YAML file thus: > > > > --- !omap > > - parent: > > id: 1 > > -descendent > > id: 2 > > parent_id: 1 > > -another > > id: 3 > > parent_id: 2 > > > > This will ensure that the database rows are loaded into the test > > database in exactly this order. > > > > Hope this helps you out. > > > > D. Taylor Singletary, > > Reality Technician. > > > > On 2/23/06, Hogan, Brian P. < HOGANBP@uwec.edu> wrote: > > > > > Gotcha. That makes total sense. It also makes sense because the yml > > > probably comes from a hash, and hashes aren''t ordered. I think you''re in > > > trouble! :) > > > > > > May need to take a different approach like the one I suggested, and > > > maybe make one script that builds your test dataset for you before dumping > > > it to fixtures. > > > > > > Interesting though.... never thought about that. > > > > > > -----Original Message----- > > > *From:* rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] > > > *On Behalf Of *Zack Chandler > > > *Sent:* Thursday, February 23, 2006 2:08 PM > > > *To:* rails@lists.rubyonrails.org > > > *Subject:* Re: [Rails] Re: Fixtures and Relationships > > > > > > Brian, > > > The need is simply to correctly set up belongs_to relationships > > > specified in other yml file correctly. For example take the following: > > > > > > --- users.yml --- > > > > > > > > > > > > > > > : > > > username: > > > > > > hashed_password: 12345 > > > salt: 12345 > > > screen_name: > > > email_address: @ > > > > > > > > > gmail.com > > > > > > > > > > > > The data is loaded fine but foo is not loaded first as you would expect. > > > > > > Later I load the fixture posts.yml which is a belongs_to :user. Unfortunately > > > the record does not link to foo as you would expect. > > > I have seen references to ordered yaml ( > > > > > > http://yaml.org/type/omap.html > > > ) but > > > don''t understand yet how or if that can be used. > > > > > > BTW, this is purely to setup the db for testing. > > > > > > Any ideas? > > > > > > Zack > > > > > > On 2/23/06, Hogan, Brian P. <HOGANBP@uwec.edu > wrote: > > > > > > > > if you need a certain order, you might handle that with your object > > > > calls.... like has_many :order and such. I would never rely on my items to > > > > be in a specific order in the database. Just my .02 > > > > > > > > -----Original Message----- > > > > *From:* rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] > > > > *On Behalf Of *Zack Chandler > > > > *Sent:* Thursday, February 23, 2006 10:41 AM > > > > *To:* rails@lists.rubyonrails.org > > > > *Subject:* Re: [Rails] Re: Fixtures and Relationships > > > > > > > > I had a related question... Does anyone know how to have the > > > > elements inside the fixtures loaded in order. I want to guarantee that the > > > > items in the yml fixture file get loaded in order (see below - item1 loaded > > > > before item2) > > > > > > > > item1: > > > > value: > > > > > > > > item2 > > > > value: > > > > > > > > Thanks, > > > > Zack > > > > > > > > On 2/22/06, Dylan Stamat < dylans@gmail.com > wrote: > > > > > > > > > > Found the answer, albeit, it would be nice if this feature existed > > > > > natively within Rails :) > > > > > http://kekova.ca/articles/2005/12/31/loading-your-test-db-to-your-development-db > > > > > > > > > > > > > > > Thanks Chris ! > > > > > > > > > > > > > > > > > > > > On 2/22/06, Dylan Stamat < dylans@gmail.com> wrote: > > > > > > > > > > > > In my daily development, I migrate back and forth between > > > > > > versions, and often do: rake load_fixtures... > > > > > > ... in order to populate my development database with fun data. > > > > > > > > > > > > Now, with any HABTM relationship, there are failures, as there > > > > > > is no way to say "which" fixtures to load first. > > > > > > > > > > > > Within an actual functional or unit test case, you could simply > > > > > > load them in the proper order, but I''m not doing any tests yet, but simply > > > > > > using the fixture data for development purposes. > > > > > > > > > > > > Either there is a major loophole in this process, or, I''m > > > > > > totally approaching this wrong. I''m voting for the latter :) > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rails mailing list > > > > > Rails@lists.rubyonrails.org > > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rails mailing list > > > > Rails@lists.rubyonrails.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060224/b32ab27c/attachment-0001.html
Taylor, I really appreciate your help on this one. In fact the problem was the width of spaces lining up with the extra space caused by the space between the "-" before the record definition. I had 2 spaces and I needed 3 to make it work. What a nightmare! Thanks again for all your help. BTW I never could get the -%> terminator that suppresses the newline to work in the fixture. I use them all the time in my views. Who knows... Zack On 2/23/06, D. Taylor Singletary <taylorsingletary@gmail.com> wrote:> > I''m not sure if this is your problem, but it might be. YAML files are > pretty sensitive to whitespace versus tabs, and it may behoove you to keep > the file pretty clean of excess spaces by ending your non-content generating > erb calls with a - character, which stops them from producing a line break > after they''ve been processed. So for the ones that don''t start with <%= ... > %> try it like: <% screen_names.each do |name| -%> (notice the "-" prior > to the %> ) > > Also, make sure you are using two spaces rather than a tab character for > your field definitions. Also, make sure there is a space between your "-" > character prior to the "record name" definition.. When I succesfully got > omap to work today, I increased my "soft tab width" to match towards the > extra characters generated by the "-" in the "named record" area... so if I > were to do what you''re doing, I would have done it like this (though I > haven''t tested your particular example): > > <% > screen_names = [ > ''nickta'', ''herro'', ''hansgouer'', ''kilterman'', ''zenman'', ''honemaster'', > > ''rawfingers'', ''gymrat'', ''beautygirl'', ''nikki'', ''jason'', ''roo'', > ''dresserlan'' > ] > -%> > --- !omap > <% screen_names.each do |name| -%> > - <%= name %>: > username: <%= name %> > hashed_password: <%= rand(1000000) %> > salt: <%= rand(1000000) %> > screen_name: <%= name %> > email_address: <%= name %>@ gmail.com > <% end %-> > > D. Taylor Singletary, > Reality Technician > > On 2/23/06, Zack Chandler < zackchandler@gmail.com> wrote: > > > > Taylor, Ezra, > > Thanks for your help. I feel like I''m really close and must have one > > small typo/misunderstanding. I''ve tried !omap and this is the error I > > receive: > > > > rake aborted! > > a YAML error occured parsing test/fixtures/users.yml. Please note that > > YAML must > > be consistently indented using spaces. Tabs are not allowed. Please > > have a look > > at http://www.yaml.org/faq.html > > The exact error was: > > YAML::Error: Invalid !omap: {"-nikki"=>{"salt"=>245481, > > "hashed_password"=>426 > > 065, "username"=>"nikki", "screen_name"=>"nikki", "email_address"=>" > > nikki@gmail. > > com"}, "-honemaster"=>{"salt"=>24598, "hashed_password"=>814677, > > "username"=>"ho > > nemaster", "screen_name"=>"honemaster", "email_address"=>"honemaster@gmail.com > > "} > > , "-hansgouer"=>{"salt"=>631182, "hashed_password"=>328485, > > "username"=>"hansgou > > er", "screen_name"=>"hansgouer", "email_address"=>"hansgouer@gmail.com "}, > > "-kilt > > erman"=>{"salt"=>948687, "hashed_password"=>287631, > > "username"=>"kilterman", "sc > > reen_name"=>"kilterman", "email_address"=>"kilterman@gmail.com"}, > > "-zenman"=>{"s > > alt"=>194883, "hashed_password"=>736319, "username"=>"zenman", > > "screen_name"=>"z > > enman", "email_address"=>"zenman@gmail.com"}, > > "-rawfingers"=>{"salt"=>342450, "h > > ashed_password"=>855412, "username"=>"rawfingers", > > "screen_name"=>"rawfingers", > > "email_address"=>"rawfingers@gmail.com"}, "-herro"=>{"salt"=>976814, > > "hashed_pas > > sword"=>158429, "username"=>"herro", "screen_name"=>"herro", > > "email_address"=>"h > > erro@gmail.com"}, "-gymrat"=>{"salt"=>981951, "hashed_password"=>987702, > > "userna > > me"=>"gymrat", "screen_name"=>"gymrat", "email_address"=>" > > gymrat@gmail.com"}, "- > > roo"=>{"salt"=>878098, "hashed_password"=>843882, "username"=>"roo", > > "screen_nam > > e"=>"roo", "email_address"=>" roo@gmail.com"}, > > "-dresserlan"=>{"salt"=>832618, "h > > ashed_password"=>22106, "username"=>"dresserlan", > > "screen_name"=>"dresserlan", " > > email_address"=>"dresserlan@gmail.com"}, "-nickta"=>{"salt"=>256946, > > "hashed_pas > > sword"=>29039, "username"=>"nickta", "screen_name"=>"nickta", > > "email_address"=>" > > nickta@gmail.com"}, "-jason"=>{"salt"=>541275, > > "hashed_password"=>141391, "usern > > ame"=>"jason", "screen_name"=>"jason", "email_address"=>" > > jason@gmail.com"}, "-be > > autygirl"=>{"salt"=>554156, "hashed_password"=>57327, > > "username"=>"beautygirl", > > "screen_name"=>"beautygirl", "email_address"=>" beautygirl@gmail.com"}} > > > > Here is my fixture... am I missing something??? > > > > <% > > screen_names = [ > > ''nickta'', ''herro'', ''hansgouer'', ''kilterman'', ''zenman'', > > ''honemaster'', > > ''rawfingers'', ''gymrat'', ''beautygirl'', ''nikki'', ''jason'', ''roo'', > > ''dresserlan'' > > ] > > %> > > --- !omap > > <% screen_names.each do |name| %> > > -<%= name %>: > > username: <%= name %> > > hashed_password: <%= rand(1000000) %> > > salt: <%= rand(1000000) %> > > screen_name: <%= name %> > > email_address: <%= name %>@ gmail.com > > <% end %> > > > > Thanks, > > Zack > > > > On 2/23/06, Ezra Zygmuntowicz < ezra@yakimaherald.com> wrote: > > > > > > An omap is essentially an ordered hash in yaml if that helps. > > > -Ezra > > > > > > On Feb 23, 2006, at 12:54 PM, D. Taylor Singletary wrote: > > > > > > Having recently had a solution to this issue presented to me by a > > > coworker, I''m happy to help out and point how to get fixture rows loaded in > > > a particular order when running tests. This proves useful especially for > > > tree data structures. It may not necessarily be the answer to the question > > > you were asking, but it''s useful knowledge nonetheless. > > > > > > http://api.rubyonrails.org/classes/Fixtures.html details how to set up > > > your YAML file to order the database rows you''ve defined using an Omap. > > > While the documentation for both omap and the fixtures here leaves something > > > to be desired, essentially you can setup a YAML file thus: > > > > > > --- !omap > > > - parent: > > > id: 1 > > > -descendent > > > id: 2 > > > parent_id: 1 > > > -another > > > id: 3 > > > parent_id: 2 > > > > > > This will ensure that the database rows are loaded into the test > > > database in exactly this order. > > > > > > Hope this helps you out. > > > > > > D. Taylor Singletary, > > > Reality Technician. > > > > > > On 2/23/06, Hogan, Brian P. < HOGANBP@uwec.edu> wrote: > > > > > > > Gotcha. That makes total sense. It also makes sense because the yml > > > > probably comes from a hash, and hashes aren''t ordered. I think you''re in > > > > trouble! :) > > > > > > > > May need to take a different approach like the one I suggested, and > > > > maybe make one script that builds your test dataset for you before dumping > > > > it to fixtures. > > > > > > > > Interesting though.... never thought about that. > > > > > > > > -----Original Message----- > > > > *From:* rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] > > > > *On Behalf Of *Zack Chandler > > > > *Sent:* Thursday, February 23, 2006 2:08 PM > > > > *To:* rails@lists.rubyonrails.org > > > > *Subject:* Re: [Rails] Re: Fixtures and Relationships > > > > > > > > Brian, > > > > The need is simply to correctly set up belongs_to relationships > > > > specified in other yml file correctly. For example take the following: > > > > > > > > --- users.yml --- > > > > > > > > > > > > > > > > > > > > : > > > > username: > > > > > > > > hashed_password: 12345 > > > > salt: 12345 > > > > screen_name: > > > > email_address: @ > > > > > > > > > > > > > > > > gmail.com > > > > > > > > > > > > > > > > The data is loaded fine but foo is not loaded first as you would expect. > > > > > > > > Later I load the fixture posts.yml which is a belongs_to :user. Unfortunately > > > > the record does not link to foo as you would expect. > > > > I have seen references to ordered yaml ( > > > > > > > > > > > > http://yaml.org/type/omap.html > > > > ) but > > > > don''t understand yet how or if that can be used. > > > > > > > > BTW, this is purely to setup the db for testing. > > > > > > > > Any ideas? > > > > > > > > Zack > > > > > > > > On 2/23/06, Hogan, Brian P. <HOGANBP@uwec.edu > wrote: > > > > > > > > > > if you need a certain order, you might handle that with your > > > > > object calls.... like has_many :order and such. I would never rely on my > > > > > items to be in a specific order in the database. Just my .02 > > > > > > > > > > -----Original Message----- > > > > > *From:* rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] > > > > > *On Behalf Of *Zack Chandler > > > > > *Sent:* Thursday, February 23, 2006 10:41 AM > > > > > *To:* rails@lists.rubyonrails.org > > > > > *Subject:* Re: [Rails] Re: Fixtures and Relationships > > > > > > > > > > I had a related question... Does anyone know how to have the > > > > > elements inside the fixtures loaded in order. I want to guarantee that the > > > > > items in the yml fixture file get loaded in order (see below - item1 loaded > > > > > before item2) > > > > > > > > > > item1: > > > > > value: > > > > > > > > > > item2 > > > > > value: > > > > > > > > > > Thanks, > > > > > Zack > > > > > > > > > > On 2/22/06, Dylan Stamat < dylans@gmail.com > wrote: > > > > > > > > > > > > Found the answer, albeit, it would be nice if this feature > > > > > > existed natively within Rails :) > > > > > > http://kekova.ca/articles/2005/12/31/loading-your-test-db-to-your-development-db > > > > > > > > > > > > > > > > > > Thanks Chris ! > > > > > > > > > > > > > > > > > > > > > > > > On 2/22/06, Dylan Stamat < dylans@gmail.com> wrote: > > > > > > > > > > > > > > In my daily development, I migrate back and forth between > > > > > > > versions, and often do: rake load_fixtures... > > > > > > > ... in order to populate my development database with fun > > > > > > > data. > > > > > > > > > > > > > > Now, with any HABTM relationship, there are failures, as there > > > > > > > is no way to say "which" fixtures to load first. > > > > > > > > > > > > > > Within an actual functional or unit test case, you could > > > > > > > simply load them in the proper order, but I''m not doing any tests yet, but > > > > > > > simply using the fixture data for development purposes. > > > > > > > > > > > > > > Either there is a major loophole in this process, or, I''m > > > > > > > totally approaching this wrong. I''m voting for the latter :) > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Rails mailing list > > > > > > Rails@lists.rubyonrails.org > > > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Rails mailing list > > > > > Rails@lists.rubyonrails.org > > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rails mailing list > > > > Rails@lists.rubyonrails.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060224/06fccc39/attachment-0001.html