| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
As @matthewd's suggestion, if `klass` has no default scope, it will more
faster.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Some third party modules expects that association returns same proxy
object each time (e.g. for stubbing collection methods:
https://github.com/rspec/rspec-rails/issues/1817).
So I decided that cache the proxy object and reset scope in the proxy
object each time.
Related context: https://github.com/rails/rails/commit/c86a32d7451c5d901620ac58630460915292f88b#commitcomment-2784312
|
|
|
|
|
|
|
|
| |
This fixes the following issues.
* `association_scope` doesn't include `default_scope`. Should use `scope` instead.
* We can't use `method_missing` for customizing existing method.
* We can't use `relation_delegate_class` for sharing extensions. Should extend per association.
|
|
|
|
|
|
| |
`find` raises when it can't find a record, so we'll never reach the
else. Switch to `find_by` which returns nil when no record can be
found.
|
| |
|
| |
|
|\
| |
| | |
[ci skip]fix wrong variable name in docs
|
| | |
|
|\ \
| |/
|/| |
[ci skip]fix wrong variable name in docs
|
|/ |
|
|
|
|
| |
https://github.com/guard/rb-inotify/pull/49 has been merged.
|
|\
| |
| | |
Doc updates for ActiveRecord::Batches
|
| |
| |
| | |
[ci skip]
|
|\ \
| | |
| | | |
Fix broken RDoc formatting
|
| | |
| | |
| | |
| | | |
[ci skip]
|
|\ \ \
| |/ /
|/| |
| | | |
Update to Rails ujs readme
|
| | | |
|
|\ \ \
| | | |
| | | | |
[ci skip] Changed sentence formation for ActiveRecordRelation#update
|
| | | | |
|
|\ \ \ \
| |_|/ /
|/| | | |
Provides friendlier way to access queue adapters of a job.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
fixed indentation.
rebased with master.
|
| | | |
| | | |
| | | |
| | | | |
- removed predicate method. Used only reader.
|
|\ \ \ \
| |_|_|/
|/| | | |
Do not show --webpack option in the plugin help message
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
Remove a redundant test assertion
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
singleton (#29180)
* Add ActiveSupport::CurrentAttributes to provide a thread-isolated attributes singleton
* Need to require first
* Move stubs into test namespace.
Thus they won't conflict with other Current and Person stubs.
* End of the line for you, whitespace!
* Support super in attribute methods.
Define instance level accessors in an included module such that
`super` in an overriden accessor works, akin to Active Model.
* Spare users the manual require.
Follow the example of concerns, autoload in the top level Active Support file.
* Add bidelegation support
* Rename #expose to #set. Simpler, clearer
* Automatically reset every instance.
Skips the need for users to actively embed something that resets
their CurrentAttributes instances.
* Fix test name; add tangible name value when blank.
* Try to ensure we run after a request as well.
* Delegate all missing methods to the instance
This allows regular `delegate` to serve, so we don't need bidelegate.
* Properly test resetting after execution cycle.
Also remove the stale puts debugging.
* Update documentation to match new autoreset
|
|\ \ \ \
| |_|/ /
|/| | | |
CI against JRuby 9.1.10.0
|
| |/ /
| | |
| | |
| | | |
http://jruby.org/2017/05/25/jruby-9-1-10-0.html
|
|\ \ \
| | | |
| | | | |
Remove unused test class
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
`AlsoDoingNothingTest` was added in cf9be89.
It seems that it added to confirm that the test works in the child class
of `ActiveSupport::TestCase`.
But now basically use `ActiveSupport::TestCase` in test, so I think
it is unnecessary.
|
| | | | |
|
| |/ /
|/| | |
|
|\ \ \
| | | |
| | | | |
Define path with __dir__
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
".. with __dir__ we can restore order in the Universe." - by @fxn
Related to 5b8738c2df003a96f0e490c43559747618d10f5f
|
|\ \ \ \
| | | | |
| | | | | |
Remove a duplicate test of migration_test in AR
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Remove a duplicate test of schema_authorization_test in AR
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
ActiveRecord initialization optimizations
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This change preserves the speedup made in a24912cb1d3 (by avoiding
the wasted shallow dup of @attributes) while ensuring that the
performance of #deep_dup won't be tied to the performance of #initialize
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Memoize the #column_defaults class property, as ActiveRecord does
for other properties in this module.
This change addresses slowness in ActiveRecord initialization
introduced starting in Rails 5.0. This method's performance has not
changed with Rails 5, but it is now called much more frequently than
before: every time an STI model is instantiated.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This change addresses slowness in ActiveRecord initialization
introduced starting in Rails 5.0.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Skip the call to #dup, since it does a shallow copy of attributes,
which is wasted effort, since #deep_dup then replaces that
shallow copy with a #deep_dup of the given attributes.
This change addresses slowness in ActiveRecord initialization
introduced starting in Rails 5.0.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Remove a duplicate test of mysql_rake_test
|
| | |/ / / / /
| |/| | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Add a Monitor to ModelSchema#load_schema
|
| | |/ / / / /
| |/| | | | |
| | | | | | |
| | | | | | | |
[Vikrant Chaudhary, David Abdemoulaie, Matthew Draper]
|
|\ \ \ \ \ \ \
| |_|_|_|_|/ /
|/| | | | | | |
Remove redundant test method
|