Forum: Ruby on Rails Instance variable shortcuts to fixture data are not working?

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.
5b336f18b089138ec0968b2d9f12f03b?d=identicon&s=25 Sergei Serdyuk (sserdyuk)
on 2006-03-21 18:39
Hi,

I am following the Agile Web Development with Rails book and it looks
like either book is wrong or edge rails are broken.

I am trying to access fixture data through instance shortcuts. I.e.
customers.yml through @customers and it is not assigned.

Anybody knows why?

Sergei
5b336f18b089138ec0968b2d9f12f03b?d=identicon&s=25 Sergei Serdyuk (sserdyuk)
on 2006-03-21 18:39
If you have the book, look at pages 148-149 to see what I am talking
about
0f1e2ec122971063c71677aa03bfe038?d=identicon&s=25 Oliver Legg (Guest)
on 2006-03-21 18:42
(Received via mailing list)
The way the fixtures in test changed sometime, for speed improvements.

They should now be accessed as customers(:id), I think.

Or there is an option you can change in the test_helper.rb
5b336f18b089138ec0968b2d9f12f03b?d=identicon&s=25 Sergei Serdyuk (sserdyuk)
on 2006-03-21 19:59
Thank you Oliver, you are right.
This topic is locked and can not be replied to.