diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-07-30 00:05:47 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-07-30 00:05:47 -0300 |
commit | 42f01e94e231763c10d2c1e0977c6ec5b5a7c78a (patch) | |
tree | d9fe3e4e1be48354bfd063343c6be37af73d8834 /guides | |
parent | 43187f9cdc631f9ee8ec68025d81113acdf8eeef (diff) | |
parent | 92c5a2244ec3e58fd5e70e7dd2d7882b80183c80 (diff) | |
download | rails-42f01e94e231763c10d2c1e0977c6ec5b5a7c78a.tar.gz rails-42f01e94e231763c10d2c1e0977c6ec5b5a7c78a.tar.bz2 rails-42f01e94e231763c10d2c1e0977c6ec5b5a7c78a.zip |
Merge branch 'revert-order-prepending'
Conflicts:
activerecord/CHANGELOG.md
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/active_record_querying.md | 4 | ||||
-rw-r--r-- | guides/source/upgrading_ruby_on_rails.md | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index 9252a248b2..7fe9b8b4af 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -549,11 +549,11 @@ Client.order("orders_count ASC, created_at DESC") Client.order("orders_count ASC", "created_at DESC") ``` -If you want to call `order` multiple times e.g. in different context, new order will prepend previous one +If you want to call `order` multiple times e.g. in different context, new order will append previous one ```ruby Client.order("orders_count ASC").order("created_at DESC") -# SELECT * FROM clients ORDER BY created_at DESC, orders_count ASC +# SELECT * FROM clients ORDER BY orders_count ASC, created_at DESC ``` Selecting Specific Fields diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md index 656e6d9956..73c783085e 100644 --- a/guides/source/upgrading_ruby_on_rails.md +++ b/guides/source/upgrading_ruby_on_rails.md @@ -153,8 +153,6 @@ Rails 4.0 no longer supports loading plugins from `vendor/plugins`. You must rep * In Rails 4.0 when a column or a table is renamed the related indexes are also renamed. If you have migrations which rename the indexes, they are no longer needed. -* Rails 4.0 has changed how orders get stacked in `ActiveRecord::Relation`. In previous versions of Rails, the new order was applied after the previously defined order. But this is no longer true. Check [Active Record Query guide](active_record_querying.html#ordering) for more information. - * Rails 4.0 has changed `serialized_attributes` and `attr_readonly` to class methods only. You shouldn't use instance methods since it's now deprecated. You should change them to use class methods, e.g. `self.serialized_attributes` to `self.class.serialized_attributes`. * Rails 4.0 has removed `attr_accessible` and `attr_protected` feature in favor of Strong Parameters. You can use the [Protected Attributes gem](https://github.com/rails/protected_attributes) for a smooth upgrade path. |