- 02 7月, 2017 6 次提交
-
-
由 yuuji.yaginuma 提交于
-
由 eileencodes 提交于
Let's say you have a nested transaction and both records are saved. Before the outer transaction closes, a rollback is performed. Previously the record in the outer transaction would get marked as not persisted but the inner transaction would get persisted. ```ruby Post.transaction do post_one.save # will get rolled back Post.transaction(requires_new: true) do post_two.save # incorrectly remains marked as persisted end raise ActiveRecord::Rollback end ``` To fix this the PR changes transaction handling to have the child transaction ask the parent how the records should be marked. When there are child transactions, it will always be a SavpointTransaction because the stack isn't empty. From there we pass the parent_transaction to the child SavepointTransaction where we add the children to the parent so the parent can mark the inner transaction as rolledback and thus mark the record as not persisted. `update_attributes_from_transaction_state` uses the `completed?` check to correctly mark all the transactions as rolledback and the inner record as not persisted. ```ruby Post.transaction do post_one.save # will get rolled back Post.transaction(requires_new: true) do post_two.save # with new behavior, correctly marked as not persisted on rollback end raise ActiveRecord::Rollback end ``` Fixes #29320
-
由 eileencodes 提交于
`set_state` was directly setting the transaction state instance variable. It's better to set the state via specific methods (`rollback!` and `commit!` respectively. While undocumented and untested, it's possible someone is using `set_state` in their app or gem so I've added a deprecation notice to it. No where in the app do we use `nullify!` but I wanted to keep existing behavior while replacing the method with a better pattern.
-
由 Eileen M. Uchitelle 提交于
Warning http verb method call in SystemTestCase
-
由 Matthew Draper 提交于
-
由 Matthew Draper 提交于
This reverts commit 3420a145, reversing changes made to afb66a5a.
-
- 01 7月, 2017 21 次提交
-
-
由 Matthew Draper 提交于
Enforce frozen string in Rubocop
-
由 Matthew Draper 提交于
Make ActiveSupport frozen-string-literal friendly.
-
由 Matthew Draper 提交于
Add srcset option to image_tag helper
-
由 yalab 提交于
-
由 Eileen M. Uchitelle 提交于
Clear screenshots files in `tmp:clear` task
-
由 Eileen M. Uchitelle 提交于
Add source code and changelog link to railties.gemspec
-
由 Koichi ITO 提交于
-
由 Matthew Draper 提交于
Should be clear `@association_ids` when joined newly associated record
-
由 Matthew Draper 提交于
Don't cache queries for schema statements
-
由 Matthew Draper 提交于
Properly register "custom" URL helpers as named helpers.
-
由 Matthew Draper 提交于
Fix automatic inverse for polymorphic interfaces
-
由 Matthew Draper 提交于
Ensure `false` is preserved in attr serialization
-
由 Matthew Draper 提交于
Fix the next version of Rails from 5.3 to 6.0
-
由 Ryuta Kamizono 提交于
Fix format of `ActionController::Parameters#to_s` doc [ci skip]
-
由 Ryuta Kamizono 提交于
Delete stale comment for `AR::Associations::Builder::CollectionAssociation` [ci skip]
-
由 yuuji.yaginuma 提交于
-
由 Kir Shatrov 提交于
-
由 Wilson Bilkovich 提交于
CustomUrlHelpers were introduced in ce7d5fb2, closing issue #22512. They currently register themselves in an ivar that is never accessed. This change removes the @custom_helpers special-case, and registers them the way named routes are normally handled. Without this, you can get route_defined?(:example_url) == false, while still being able to call url_helpers.example_url and example_path. Various popular gems such as 'rspec-rails' make use of route_defined?() when determining how to proxy method calls or whether to define a route.
-
由 fatkodima 提交于
-
由 Prathamesh Sonpatki 提交于
-
由 Rafael França 提交于
Fallback Parameters#to_s to Hash#to_s
-
- 30 6月, 2017 9 次提交
-
-
由 Eileen M. Uchitelle 提交于
Add system tests to generate scaffold
-
-
由 Dinah Shi 提交于
-
由 Vipul A M 提交于
[ci skip] run migration before looking at schema
-
由 Sai Prashanth 提交于
-
由 Ryuta Kamizono 提交于
`test_middleware_caches` is sometimes failed since #29454. The failure is due to schema statements are affected by query caching. Bypassing query caching for schema statements to avoid the issue.
-
由 Ryuta Kamizono 提交于
Fixes #29627.
-
由 Rafael França 提交于
Specify correct extension for text layouts
-
由 Rafael França 提交于
Should use the same connection in using query cache
-
- 29 6月, 2017 4 次提交
-
-
由 Koichi ITO 提交于
-
由 Rafael França 提交于
Fix the next version of Rails from 5.3 to 6.0
-
由 Ryuta Kamizono 提交于
-
由 Kasper Timm Hansen 提交于
Deprecate delegating to `arel` in `Relation`
-