diff options
Diffstat (limited to 'guides/source/upgrading_ruby_on_rails.md')
-rw-r--r-- | guides/source/upgrading_ruby_on_rails.md | 12 |
1 files changed, 6 insertions, 6 deletions
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 |