Ok, I''m pretty sure I''ve seen this done before. I have a fixture that isn''t named the same as the table I want to insert the stuff into. Whats the right way to go about this?! Google has failed me! :( -Nick
Nick Stuart wrote:> Ok, I''m pretty sure I''ve seen this done before. I have a fixture that > isn''t named the same as the table I want to insert the stuff into. > Whats the right way to go about this?!Unless you''re doing wizardly fixture sharing the simplest thing would be to rename the yml file. Otherwise you need to embed ruby snippets into the fixtures, same as you do for rhtml files in your views zsombor -- Company - http://primalgrasp.com Thoughts - http://deezsombor.blogspot.com
Could of sworn I saw this somewhere, maybe I''m wrong. The reason I ask is for testing STI, and having the different classes be allowed to use different fixtures...meh, guess I''ll stick em all in one file then. Thanks anyways! -Nick On 2/8/06, Dee Zsombor <dee.zsombor@gmail.com> wrote:> Nick Stuart wrote: > > Ok, I''m pretty sure I''ve seen this done before. I have a fixture that > > isn''t named the same as the table I want to insert the stuff into. > > Whats the right way to go about this?! > > Unless you''re doing wizardly fixture sharing the simplest thing would be > to rename the yml file. Otherwise you need to embed ruby snippets into the > fixtures, same as you do for rhtml files in your views > > zsombor > -- > Company - http://primalgrasp.com > Thoughts - http://deezsombor.blogspot.com > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Have a look at: http://wiki.rubyonrails.com/rails/pages/FlexibleFixtures Sounds like what you are after. Knew I''d seen it somewhere as well :-) Cheers, Tony On 2/9/06, Nick Stuart <nicholas.stuart@gmail.com> wrote:> Could of sworn I saw this somewhere, maybe I''m wrong. The reason I ask > is for testing STI, and having the different classes be allowed to use > different fixtures...meh, guess I''ll stick em all in one file then. > > Thanks anyways! > -Nick > > On 2/8/06, Dee Zsombor <dee.zsombor@gmail.com> wrote: > > Nick Stuart wrote: > > > Ok, I''m pretty sure I''ve seen this done before. I have a fixture that > > > isn''t named the same as the table I want to insert the stuff into. > > > Whats the right way to go about this?! > > > > Unless you''re doing wizardly fixture sharing the simplest thing would be > > to rename the yml file. Otherwise you need to embed ruby snippets into the > > fixtures, same as you do for rhtml files in your views > > > > zsombor > > -- > > Company - http://primalgrasp.com > > Thoughts - http://deezsombor.blogspot.com > > _______________________________________________
That looks like what I ran across last time! Thanks Tony! -Nick On 2/8/06, Tony Ketteringham <tony.ketteringham@gmail.com> wrote:> > Have a look at: > http://wiki.rubyonrails.com/rails/pages/FlexibleFixtures > Sounds like what you are after. > Knew I''d seen it somewhere as well :-) > Cheers, > Tony > > On 2/9/06, Nick Stuart <nicholas.stuart@gmail.com> wrote: > > Could of sworn I saw this somewhere, maybe I''m wrong. The reason I ask > > is for testing STI, and having the different classes be allowed to use > > different fixtures...meh, guess I''ll stick em all in one file then. > > > > Thanks anyways! > > -Nick > > > > On 2/8/06, Dee Zsombor <dee.zsombor@gmail.com> wrote: > > > Nick Stuart wrote: > > > > Ok, I''m pretty sure I''ve seen this done before. I have a fixture > that > > > > isn''t named the same as the table I want to insert the stuff into. > > > > Whats the right way to go about this?! > > > > > > Unless you''re doing wizardly fixture sharing the simplest thing would > be > > > to rename the yml file. Otherwise you need to embed ruby snippets into > the > > > fixtures, same as you do for rhtml files in your views > > > > > > zsombor > > > -- > > > Company - http://primalgrasp.com > > > Thoughts - http://deezsombor.blogspot.com > > > _______________________________________________ > _______________________________________________ > 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/20060209/4671ce36/attachment.html