1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

- Make example code consistent for better understanding. [ci skip]

This commit is contained in:
Santosh Wadghule 2015-03-18 14:30:05 +05:30
parent 314ab7b14d
commit 4fd571abe2

View file

@ -173,18 +173,18 @@ name that should be used:
```ruby
class Product < ActiveRecord::Base
self.table_name = "PRODUCT"
self.table_name = "my_products"
end
```
If you do so, you will have to define manually the class name that is hosting
the fixtures (class_name.yml) using the `set_fixture_class` method in your test
the fixtures (my_products.yml) using the `set_fixture_class` method in your test
definition:
```ruby
class FunnyJoke < ActiveSupport::TestCase
set_fixture_class funny_jokes: Joke
fixtures :funny_jokes
class ProductTest < ActiveSupport::TestCase
set_fixture_class my_products: Product
fixtures :my_products
...
end
```