aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/association_basics.md
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-06-22 13:58:30 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-06-22 13:58:30 -0300
commitd8458df97f76477c8623c05c5ff3954017218815 (patch)
tree0ecb0489932076e079e2127e55d3ea87823228bd /guides/source/association_basics.md
parentebc4c607a7859c9c35246d7fe74a17208ef3a66e (diff)
parent35bbeabbb690143e4125fbb003d09e0a25cdf8f4 (diff)
downloadrails-d8458df97f76477c8623c05c5ff3954017218815.tar.gz
rails-d8458df97f76477c8623c05c5ff3954017218815.tar.bz2
rails-d8458df97f76477c8623c05c5ff3954017218815.zip
Merge pull request #20663 from andreynering/patch-1
Minor fixes [ci skip]
Diffstat (limited to 'guides/source/association_basics.md')
-rw-r--r--guides/source/association_basics.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/association_basics.md b/guides/source/association_basics.md
index 05dd0d2a04..5c96a53d09 100644
--- a/guides/source/association_basics.md
+++ b/guides/source/association_basics.md
@@ -2344,13 +2344,13 @@ associations, public methods, etc.
Creating a car will save it in the `vehicles` table with "Car" as the `type` field:
```ruby
-Car.create color: 'Red', price: 10000
+Car.create(color: 'Red', price: 10000)
```
will generate the following SQL:
```sql
-INSERT INTO "vehicles" ("type", "color", "price") VALUES ("Car", "Red", 10000)
+INSERT INTO "vehicles" ("type", "color", "price") VALUES ('Car', 'Red', 10000)
```
Querying car records will just search for vehicles that are cars: