aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_record_basics.md
diff options
context:
space:
mode:
authorSantosh Wadghule <santosh.wadghule@gmail.com>2015-03-18 14:30:05 +0530
committerSantosh Wadghule <santosh.wadghule@gmail.com>2015-03-18 14:30:05 +0530
commit4fd571abe297fcb30adba8c77f26e1ff3177128c (patch)
treea3aeda204f7aa669431627de7050190c2fc08343 /guides/source/active_record_basics.md
parent314ab7b14d99094e9cedd36165489f731841bd66 (diff)
downloadrails-4fd571abe297fcb30adba8c77f26e1ff3177128c.tar.gz
rails-4fd571abe297fcb30adba8c77f26e1ff3177128c.tar.bz2
rails-4fd571abe297fcb30adba8c77f26e1ff3177128c.zip
- Make example code consistent for better understanding. [ci skip]
Diffstat (limited to 'guides/source/active_record_basics.md')
-rw-r--r--guides/source/active_record_basics.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/guides/source/active_record_basics.md b/guides/source/active_record_basics.md
index 150f4c0f14..6551ba0389 100644
--- a/guides/source/active_record_basics.md
+++ b/guides/source/active_record_basics.md
@@ -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
```