|
This post originated from an RSS feed registered with Ruby Buzz
by rwdaigle.
|
Original Post: What's New in Edge Rails: Collection Fixtures
Feed Title: Ryan's Scraps
Feed URL: http://feeds.feedburner.com/RyansScraps
Feed Description: Ryan Daigle's various technically inclined rants along w/ the "What's new in Edge Rails" series.
|
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by rwdaigle
Latest Posts From Ryan's Scraps
|
|
For those of you tired of referencing the fixture method when building a collection of fixtures, your day has come
Gone are the days of unnecessary typing:
1
2
3
|
fixtures :states
..
assert_equal [states(:nc), states(:va)], State.find(:all) |
and here are the days of a convenient syntax for retrieving more than one fixture at a time:
1
2
3
|
fixtures :states
..
assert_equal states(:nc, :va), State.find(:all) |
Revolutionary? No. Useful? Yes.
tags: ruby,
rubyonrails


Read: What's New in Edge Rails: Collection Fixtures