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
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 S. 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
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
That looks like what I ran across last time! Thanks Tony!
-Nick
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs