Forum: Ruby on Rails Fixture question...

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Nick S. (Guest)
on 2006-02-08 20:24
(Received via mailing list)
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
Dee Z. (Guest)
on 2006-02-08 23:02
(Received via mailing list)
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
Nick S. (Guest)
on 2006-02-08 23:37
(Received via mailing list)
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
Tony Ketteringham (Guest)
on 2006-02-09 01:42
(Received via mailing list)
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
Nick S. (Guest)
on 2006-02-09 03:08
(Received via mailing list)
That looks like what I ran across last time! Thanks Tony!

-Nick
This topic is locked and can not be replied to.