aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_record_basics.md
diff options
context:
space:
mode:
Diffstat (limited to 'guides/source/active_record_basics.md')
-rw-r--r--guides/source/active_record_basics.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/guides/source/active_record_basics.md b/guides/source/active_record_basics.md
index bd8cdf62f2..6551ba0389 100644
--- a/guides/source/active_record_basics.md
+++ b/guides/source/active_record_basics.md
@@ -20,7 +20,7 @@ After reading this guide, you will know:
What is Active Record?
----------------------
-Active Record is the M in [MVC](getting_started.html#the-mvc-architecture) - the
+Active Record is the M in [MVC](http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller) - the
model - which is the layer of the system responsible for representing business
data and logic. Active Record facilitates the creation and use of business
objects whose data requires persistent storage to a database. It is an
@@ -122,7 +122,7 @@ to Active Record instances:
* `(association_name)_type` - Stores the type for
[polymorphic associations](association_basics.html#polymorphic-associations).
* `(table_name)_count` - Used to cache the number of belonging objects on
- associations. For example, a `comments_count` column in a `Articles` class that
+ associations. For example, a `comments_count` column in an `Article` class that
has many instances of `Comment` will cache the number of existent comments
for each article.
@@ -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
```