- 12 5月, 2015 1 次提交
-
-
由 claudiob 提交于
Stems from https://github.com/rails/rails/pull/20105#issuecomment-100900939 where @senny said: > From my point of view, all the docs (guides, API) are version bound. > They should describe that version and continue to be available when newer versions are released. > The cross referencing can be done by the interested user.
-
- 11 5月, 2015 1 次提交
-
-
由 claudiob 提交于
Now that master points at Rails 5, we might not need to explain how things used to work in Rails 3. Or we might… up to you
😁
-
- 11 4月, 2015 1 次提交
-
-
由 Kohei Suzuki 提交于
It fixes the strange error saying undefined method `take'. ``` RelationTest#test_find_by_without_arg_behaves_same_with_find_by({}): NoMethodError: undefined method `take' for #<ActiveRecord::QueryMethods::WhereChain:0x007f9c55db1d68> ```
-
- 31 3月, 2015 1 次提交
-
-
由 Alexander Dimitriyadi 提交于
-
- 22 3月, 2015 1 次提交
-
-
由 pinglamb 提交于
association While joining table of has_many :through association, ActiveRecord will use the actual table name instead of through-join alias. It results with a wrong SQL and exception is raised. This only happens when calculation methods like #count is called. This issue is affecting Rails 4.1.x and 4.2.x as well.
-
- 28 2月, 2015 1 次提交
-
-
由 Vipul A M 提交于
Removed non-standard and unused require 'active_support/deprecation' from parts out of active_support.
-
- 28 1月, 2015 2 次提交
-
-
由 Sean Griffin 提交于
`bound_attributes` is now used universally across the board, removing the need for the conversion layer. These changes are mostly mechanical, with the exception of the log subscriber. Additional, we had to implement `hash` on the attribute objects, so they could be used as a key for query caching.
-
由 Sean Griffin 提交于
The bind values can come from four places. `having`, `where`, `joins`, and `from` when selecting from a subquery that contains binds. These need to be kept in a specific order, since the clauses will always appear in that order. Up until recently, they were not. Additionally, `joins` actually did keep its bind values in a separate location (presumably because it's the only case that people noticed was broken). However, this meant that anything accessing just `bind_values` was broken (which most places were). This is no longer possible, there is only a single way to access the bind values, and it includes joins in the proper location. The setter was removed yesterday, so breaking `+=` cases is not possible. I'm still not happy that `joins` is putting it's bind values on the Arel AST, and I'm planning on refactoring it further, but this removes a ton of bug cases.
-
- 24 1月, 2015 1 次提交
-
-
由 Sean Griffin 提交于
Fixes #18632
-
- 27 12月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
Part of the larger refactoring to remove type casting from Arel.
-
- 30 11月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
`where_sql` now requires that we pass it an engine. None of the manager classes take an engine in their constructor.
-
- 29 11月, 2014 1 次提交
-
-
由 Erik Michaels-Ober 提交于
-
- 03 11月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
We should not behave differently just because a class has a default scope.
-
- 02 11月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
-
- 01 11月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
Sufficiently large integers cause `find` and `find_by` to raise `StatementInvalid` instead of `RecordNotFound` or just returning `nil`. Given that we can't cast to `nil` for `Integer` like we would with junk data for other types, we raise a `RangeError` instead, and rescue in places where it would be highly unexpected to get an exception from casting. Fixes #17380
-
- 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.
-
- 14 10月, 2014 1 次提交
-
-
由 claudiob 提交于
This commit removes the duplication of the error message: > Couldn't find #{@klass.name} with [#{arel.where_sql}] introduced in #15791 by adding a private method `find_nth!` that deals with all the method like `first!` and `second!`.
-
- 05 9月, 2014 1 次提交
-
-
由 Godfrey Chan 提交于
This is cased by 03118bc5 + 9b5d603c. The first commit referenced the undefined local variable `column` when it should be using `reflection.type` as the lookup key. The second commit changed `build_arel` to not modify the `bind_values` in- place so we need to combine the arel's `bind_values` with the relation's when building the SQL. Fixes #16591 Related #15821 / #15892 / 7aeca506
-
- 19 8月, 2014 1 次提交
-
-
由 Kassio Borges 提交于
Fixes #15821.
-
- 18 6月, 2014 1 次提交
-
-
由 Zev Blut 提交于
Model that the Record was not found in.
-
- 10 6月, 2014 1 次提交
-
-
由 James Yang 提交于
-
- 17 5月, 2014 1 次提交
-
-
由 Matt Jones 提交于
-
- 24 4月, 2014 1 次提交
-
-
由 Eric Bouchut 提交于
-
- 13 4月, 2014 3 次提交
-
-
由 Aaron Patterson 提交于
we're guaranteed to pass a numeric value for offset, so if it's zero, just don't add an offset to the query
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
- 14 3月, 2014 3 次提交
-
-
由 Aaron Patterson 提交于
please pass the id of the AR object by calling `.id` on the model first.
-
由 Aaron Patterson 提交于
Pass the id of the object to the method by calling `.id` on the AR object.
-
由 Aaron Patterson 提交于
-
- 04 3月, 2014 1 次提交
-
-
由 Martin Schürrer 提交于
When we build a query with an inline value that is a numeric (e.g. because it's out of range for an int4) PostgreSQL doesn't use an index on the column, since it's now comparing numerics and not int4s. This leads to a _very_ slow query. When we use bound parameters instead of inline values PostgreSQL raises numeric_value_out_of_range since no automatic coercion happens.
-
- 15 2月, 2014 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 25 1月, 2014 1 次提交
-
-
由 Kuldeep Aggarwal 提交于
-
- 22 1月, 2014 1 次提交
-
-
由 Jason Meller 提交于
This commit fixes two regressions introduced in cafe31a0 where newly created finder methods #second, #third, #forth, and #fifth caused a NoMethodError error on reload associations and where we were pulling the wrong element out of cached associations. Examples: some_book.authors.reload.second # Before # => NoMethodError: undefined method 'first' for nil:NilClass # After # => #<Author id: 2, name: "Sally Second", ...> some_book.first.authors.first some_book.first.authors.second # Before # => #<Author id: 1, name: "Freddy First", ...> # => #<Author id: 1, name: "Freddy First", ...> # After # => #<Author id: 1, name: "Freddy First", ...> # => #<Author id: 2, name: "Sally Second", ...> Fixes #13783.
-
- 21 1月, 2014 1 次提交
-
-
由 Jason Meller 提交于
This commit bring the famous ordinal Array instance methods defined in ActiveSupport into ActiveRecord as fully-fledged finders. These finders ensure a default ascending order of the table's primary key, and utilize the OFFSET SQL verb to locate the user's desired record. If an offset is defined in the query, calling #second adds to the offset to get the actual desired record. Fixes #13743.
-
- 14 1月, 2014 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 10 1月, 2014 1 次提交
-
-
由 Yves Senn 提交于
Refs #13658
-
- 04 12月, 2013 1 次提交
-
-
由 Lauro Caetano 提交于
Closes #7441
-
- 15 11月, 2013 1 次提交
-
-
由 Yves Senn 提交于
-
- 21 10月, 2013 1 次提交
-
-
由 Shimpei Makimoto 提交于
-
- 16 10月, 2013 1 次提交
-
-
由 Rafael Mendonça França 提交于
Conflicts: activerecord/lib/active_record/relation/finder_methods.rb
-