aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-02-18 12:08:51 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-02-18 13:49:31 -0300
commit967a6dc8985ee5d9956b23ba23f0f9d39a0c07d9 (patch)
treea8a66bb93d23bf72bdde93f5023b607d804c52f7 /guides
parent6370e69143b5edce1b61135259e1f81006aaee6a (diff)
downloadrails-967a6dc8985ee5d9956b23ba23f0f9d39a0c07d9.tar.gz
rails-967a6dc8985ee5d9956b23ba23f0f9d39a0c07d9.tar.bz2
rails-967a6dc8985ee5d9956b23ba23f0f9d39a0c07d9.zip
Fix the column name [ci skip]
Diffstat (limited to 'guides')
-rw-r--r--guides/source/active_record_querying.md4
-rw-r--r--guides/source/upgrading_ruby_on_rails.md12
2 files changed, 8 insertions, 8 deletions
diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md
index 31d109a1ca..6f02da3423 100644
--- a/guides/source/active_record_querying.md
+++ b/guides/source/active_record_querying.md
@@ -1275,10 +1275,10 @@ User.all
# => SELECT "users".* FROM "users" WHERE "users"."state" = 'pending'
User.active
-# => SELECT "users".* FROM "users" WHERE "users"."status" = 'pending' AND "users"."status" = 'active'
+# => SELECT "users".* FROM "users" WHERE "users"."state" = 'pending' AND "users"."state" = 'active'
User.where(state: 'inactive')
-# => SELECT "users".* FROM "users" WHERE "users"."status" = 'pending' AND "users"."status" = 'inactive'
+# => SELECT "users".* FROM "users" WHERE "users"."state" = 'pending' AND "users"."state" = 'inactive'
```
As you can see above the `default_scope` is being merged in both
diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md
index 74cfa23649..d2b0b084b4 100644
--- a/guides/source/upgrading_ruby_on_rails.md
+++ b/guides/source/upgrading_ruby_on_rails.md
@@ -283,10 +283,10 @@ User.all
# => SELECT "users".* FROM "users" WHERE "users"."state" = 'pending'
User.active
-# => SELECT "users".* FROM "users" WHERE "users"."status" = 'active'
+# => SELECT "users".* FROM "users" WHERE "users"."state" = 'active'
User.where(state: 'inactive')
-# => SELECT "users".* FROM "users" WHERE "users"."status" = 'inactive'
+# => SELECT "users".* FROM "users" WHERE "users"."state" = 'inactive'
```
After:
@@ -302,10 +302,10 @@ User.all
# => SELECT "users".* FROM "users" WHERE "users"."state" = 'pending'
User.active
-# => SELECT "users".* FROM "users" WHERE "users"."status" = 'pending' AND "users"."status" = 'active'
+# => SELECT "users".* FROM "users" WHERE "users"."state" = 'pending' AND "users"."state" = 'active'
User.where(state: 'inactive')
-# => SELECT "users".* FROM "users" WHERE "users"."status" = 'pending' AND "users"."status" = 'inactive'
+# => SELECT "users".* FROM "users" WHERE "users"."state" = 'pending' AND "users"."state" = 'inactive'
```
To get the previous behavior it is needed to explicitly remove the
@@ -323,10 +323,10 @@ User.all
# => SELECT "users".* FROM "users" WHERE "users"."state" = 'pending'
User.active
-# => SELECT "users".* FROM "users" WHERE "users"."status" = 'active'
+# => SELECT "users".* FROM "users" WHERE "users"."state" = 'active'
User.inactive
-# => SELECT "users".* FROM "users" WHERE "users"."status" = 'inactive'
+# => SELECT "users".* FROM "users" WHERE "users"."state" = 'inactive'
```
Upgrading from Rails 3.2 to Rails 4.0