- 01 11月, 2014 1 次提交
-
-
由 Melanie Gilman 提交于
We end up re-ordering them either way when we construct the Arel AST (in order to deal with rewhere, etc), so we shouldn't bother giving it a number in the first place beforehand.
-
- 29 10月, 2014 1 次提交
-
-
由 Xavier Noria 提交于
The current style for warning messages without newlines uses concatenation of string literals with manual trailing spaces where needed. Heredocs have better readability, and with `squish` we can still produce a single line. This is a similar use case to the one that motivated defining `strip_heredoc`, heredocs are super clean.
-
- 27 10月, 2014 1 次提交
-
-
由 Dan Olson 提交于
-
- 20 10月, 2014 1 次提交
-
-
由 Dan Olson 提交于
-
- 11 9月, 2014 1 次提交
-
-
由 Yves Senn 提交于
[Matthew Draper & Yves Senn] Closes #16860. (pull request to discuss the implementation)
-
- 05 9月, 2014 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 29 8月, 2014 1 次提交
-
-
由 Godfrey Chan 提交于
Using heredoc would enforce line wrapping to whatever column width we decided to use in the code, making it difficult for the users to read on some consoles. This does make the source code read slightly worse and a bit more error-prone, but this seems like a fair price to pay since the primary purpose for these messages are for the users to read and the code will not stick around for too long.
-
- 19 8月, 2014 1 次提交
-
-
由 Rafael Mendonça França 提交于
If the request parameters are passed to create_with and where they can be used to do mass assignment when used in combination with Relation#create. Fixes CVE-2014-3514 Conflicts: activerecord/lib/active_record/relation/query_methods.rb
-
- 14 8月, 2014 1 次提交
-
-
由 Bogdan Gusiev 提交于
Example: Author.where(posts: { author_id: Author.where(country_id: 1) }).joins(:posts)
-
- 24 5月, 2014 1 次提交
-
-
由 Sergey Alekseev 提交于
It seems that #where! is not designed to be used as a chained where. See initial implementation at 8c2c6051. So, no need to check twice. We should not test #where! https://github.com/rails/rails/pull/15285#discussion_r13018316
-
- 23 5月, 2014 1 次提交
-
-
由 Paul Nikitochkin 提交于
-
- 25 4月, 2014 1 次提交
-
-
由 Yves Senn 提交于
/cc @tenderlove
-
- 22 4月, 2014 1 次提交
-
-
由 Earl J St Sauver 提交于
Fixes #14752 Select mimics the block interface of arrays, but does not mock the block interface for select!. This change moves the api to be a private method, _select!.
-
- 08 4月, 2014 1 次提交
-
-
由 Lauro Caetano 提交于
The reverse_order method was using a flag to control if the order should be reversed or not. Instead of using this variable just build the reverse order inside its proper method. This implementation was leading to an unexpected behavior when using reverse_order and then applying reorder(nil). Example: Before Post.order(:name).reverse_order.reorder(nil) # => SELECT "posts".* FROM "posts" ORDER BY "posts"."id" DESC After Post.order(:name).reverse_order.reorder(nil) # => SELECT "posts".* FROM "posts"
-
- 18 3月, 2014 1 次提交
-
-
由 Earl St Sauver 提交于
The group method also takes an array, however this isn't immediately clear by reading the source since it delegates this method. If you trace it back to the AREL building you can see that it does support an array. Shoutout to @betovelandia for pointing this out.
-
- 17 3月, 2014 1 次提交
-
-
由 Yves Senn 提交于
Closes #14406.
-
- 15 3月, 2014 1 次提交
-
-
由 Steven Harman 提交于
-
- 05 3月, 2014 3 次提交
-
-
由 Yves Senn 提交于
This is a result of the discussion at https://github.com/rails/rails/pull/14263/files#r10291489
-
由 Marcelo Casiraghi 提交于
This behavior has almost no performance impact: String not allowed 66.910000 0.030000 66.940000 ( 67.024976) String allowed 69.360000 0.030000 69.390000 ( 69.503096) Benchmarked with http://git.io/Y0YuRw.
- 01 3月, 2014 1 次提交
-
-
由 Kuldeep Aggarwal 提交于
-
- 17 2月, 2014 2 次提交
-
-
由 Rafael Mendonça França 提交于
This reverts commit 3ea84035, reversing changes made to e4cde5d5. Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/relation/query_methods.rb Reason: using `from` without `select` should not change the select list to SELECT * because it can lead different query results. If it is needed to change the table to a subquery or a view you can pass a table alias in the `from` call or use `select('subquery.*')`. Fixes #14049.
-
由 Rafael Mendonça França 提交于
-
- 02 2月, 2014 1 次提交
-
-
由 Rafael Mendonça França 提交于
Since its conception arel was made to be private API of Active Record. If users want to use arel features directly we should provide a way using the Active Record API without exposing the arel implementation.
-
- 31 1月, 2014 1 次提交
-
-
由 Washington Luiz 提交于
-
- 30 1月, 2014 1 次提交
-
-
由 Yves Senn 提交于
There is no gain in `referencing` tables that are not used for preloading. Furthermore it will break if polymorphic associations are invloved. This is because `references_eager_loaded_tables?` uses all `reference_values` to decide wether to `eager_load` or `preload`.
-
- 29 1月, 2014 1 次提交
-
-
由 Tsutomu Kuroda 提交于
With this we can write `Model#select(:aliased)`, `Model#order(:aliased)`, `Model#reoder(aliased: :desc)`, etc. Supplementary work to 54122067.
-
- 27 1月, 2014 1 次提交
-
-
由 Washington Luiz 提交于
Hopefully make it easier to debug errors. e.g Before: RuntimeError: unscope(where: "deleted_at") failed: unscoping String is unimplemented. After: RuntimeError: unscope(where: "deleted_at") failed: unscoping String "'t'='t'" is unimplemented.
-
- 22 1月, 2014 1 次提交
-
-
由 Yves Senn 提交于
This fixes a bug where `select(:id)` combined with `joins()` raised: ``` ActiveRecord::StatementInvalid: SQLite3::SQLException: ambiguous column name: id: SELECT id, authors.author_address_id FROM "posts" INNER JOIN "authors" ON "authors"."id" = "posts"."author_id" ORDER BY posts.id LIMIT 3 ``` The `select_values` are still String and Symbols because other parts (mainly calculations.rb) rely on that fact. /cc @tenderlove
-
- 18 1月, 2014 1 次提交
-
-
由 Rafael Mendonça França 提交于
The code duplication was removed and this comment is pointing to the wrong line. [ci skip]
-
- 16 1月, 2014 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 15 1月, 2014 5 次提交
-
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
- 14 1月, 2014 4 次提交
-
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
It's not public API, but is not private scoped.
-