- 22 1月, 2014 12 次提交
-
-
由 Yves Senn 提交于
Added missing `file` delivery method to the Configuration Guide
-
由 Semenyuk Dmitriy 提交于
-
由 Rafael Mendonça França 提交于
Ensure AR #second, #third, etc. finders work through associations
-
由 Rafael Mendonça França 提交于
-
由 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.
-
由 Rafael Mendonça França 提交于
Implement the Dirty API with the Enum feature correctly. Conflicts: activerecord/CHANGELOG.md
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
This will make simpler to compare if the values changed in the save_changed_attribute method.
-
由 Rafael Mendonça França 提交于
Add missing information for `id` field when used with `select` [ci skip]
-
由 Kuldeep Aggarwal 提交于
-
由 Rafael Mendonça França 提交于
Since Rails 4.0, we add an ORDER BY in the `first` method to ensure consistent results among different database engines. But for singular associations this behavior is not needed since we will have one record to return. As this ORDER BY option can lead some performance issues we are removing it for singular associations accessors. Fixes #12623.
-
由 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
-
- 21 1月, 2014 16 次提交
-
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
To make this possible we have to override the save_changed_attribute hook.
-
由 Rafael Mendonça França 提交于
This will make easier to hook on this feature to customize the behavior
-
由 Yves Senn 提交于
setup Bundler in engines `bin/rails` stub.
-
由 Yves Senn 提交于
-
由 Yves Senn 提交于
Fail early with "Primary key not included in the custom select clause" i...
-
由 Alexander Balashov 提交于
Before this patch find_in_batches raises this error only on second iteration. So you will know about the problem only when you get the batch size threshold.
-
由 Carlos Antonio da Silva 提交于
With the introduction of `#second` method and friends, we added an offsets hash which replaced the @first variable, so removing it from the reset method to avoid creating an unused variable now. Introduced in bc625080.
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
Before this patch after the changes are applied the changes can be only accessed using string keys, but before symbols are also accepted. After this change every state of the model will be consistent.
-
由 Rafael Mendonça França 提交于
This variable is internal and should not be exposed to end users
-
由 Rafael Mendonça França 提交于
Ensure #second (and others) acts like #first AR finder
-
由 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.
-
由 Rafael Mendonça França 提交于
-
由 anilmaurya 提交于
-
由 Andrew White 提交于
-
- 20 1月, 2014 12 次提交
-
-
由 Mikko Johansson 提交于
-
由 Amr Tamimi 提交于
-
由 Yves Senn 提交于
-
由 Yves Senn 提交于
-
由 Yves Senn 提交于
The PR #13767 added link to the upgrading guide to explain details about activerecord_deprecated-finders. However the link target features a stack of changes not releated at all. Also the relevant details are not very informative. I think we better link to the README so people can see what the gem is about and how to use it. /cc @chancancode @zzak
-
由 Carlos Antonio da Silva 提交于
The file is config/secrets.yml, not config/initializers/secrets.yml.
-
由 Godfrey Chan 提交于
Add link to upgrade guide for full list of deprecated finders [ci skip]
-
由 Godfrey Chan 提交于
Fix a typo that says you application [ci skip]
-
由 Arel English 提交于
-
由 Godfrey Chan 提交于
Fix for incorrect link that is pointing to Rails blog [ci skip]
-
由 Rajesh Thummalapally 提交于
-
由 Guillermo Iguaran 提交于
Update Error Message when secrets.secret_key_base isn't given
-