- 18 5月, 2020 3 次提交
-
-
由 Ryuta Kamizono 提交于
Otherwise `@_defer_touch_attrs` is touched again with old `@_touch_time` in `before_committed!`.
-
由 Vinicius Stock 提交于
* Use app:binstub:yarn in Action Text install generator
-
由 Ryuta Kamizono 提交于
Remove `sync_with_transaction_state` to simplify code base
-
- 17 5月, 2020 12 次提交
-
-
由 David Heinemeier Hansson 提交于
* Add default ENV variable option with BACKTRACE to turn off backtrace cleaning when debugging framework code * Use runner as the example Although I think we should consider dropping -b in tests and just relying on this more general option for sidestepping the backtrace cleaner.
-
由 Ryuta Kamizono 提交于
This also removes the `if @transaction_state&.finalized?` guard which is harder to understand optimization introduced at #36049. The guard is faster enough though, but removing that will make attribute access about 2% ~ 4% faster, and will make code base to ease to maintain. `sync_with_transaction_state` was introduced at #9068 to address memory bloat when creating lots of AR objects inside a transaction. I've found #18638 the same design of this to address memory bloat, but this differs from #18638 in that it will allocate one `WeakMap` object only when explicit transaction, no extra allocation for implicit transaction. Executable script to reproduce memory bloat: https://gist.github.com/kamipo/36d869fff81cf878658adc26ee38ea1b https://github.com/rails/rails/issues/15549#issuecomment-46035848 I can see no memory concern with this. Co-authored-by: NArthur Neves <arthurnn@gmail.com>
-
由 Ryuta Kamizono 提交于
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
Co-authored-by: NHaroon Ahmed <haroon.ahmed25@gmail.com>
-
由 Edouard Chin 提交于
In beb7fba6, I forgot to add a branch in the case where an application uses AR (and thus it responds to `fixture_path`) to return a path relative to `file_fixture_path`. Closes #39278.
-
由 Kasper Timm Hansen 提交于
Don't load app environment when running encrypted commands
-
由 Kasper Timm Hansen 提交于
Replace Hash#delete_if with Hash#compact
-
由 Eugene Kenny 提交于
Return enumerator from ActionController::Parameters' each_pair and each_value methods
-
由 David Heinemeier Hansson 提交于
-
由 fatkodima 提交于
-
由 Matthew Draper 提交于
Allow the construction of a CTE from an Arel::Table
-
- 16 5月, 2020 12 次提交
-
-
由 Ryuta Kamizono 提交于
Fix eager load with Arel joins to maintain the original joins order
-
由 Ryuta Kamizono 提交于
Fix group by count with eager loading + order + limit/offset
-
由 Aaron Patterson 提交于
Fixed BacktraceCleaner to never return an empty backtrace.
-
由 Jonathan Hefner 提交于
Update Rails Internationalization (I18n) API Guide [ci skip]
-
由 David Auza 提交于
Symbols that contained dashes were replaced with the right syntax. For example: :en-GB was replaced by :"en-GB" Co-authored-by: NJonathan Hefner <jonathan@hefner.pro>
-
由 Ryuta Kamizono 提交于
#38354 is caused by #36304, to fix invalid joins order for through associations. Actually passing Arel joins to `joins` is not officially supported unlike string joins, and also Arel joins could be easily converted to string joins by `to_sql`. But I'd not intend to break existing apps without deprecation cycle, so I've changed to mark only implicit joins as leading joins, to maintain the original joins order for user supplied Arel joins. Fixes #38354.
-
由 Ryan Davis 提交于
I'm not sure about this one. The gist is, minitest's UnexpectedError#message includes a backtrace but the reporter tests here expect there not to be one in inline output. Personally, I think that's wrong as it removes information you'd want to debug, but this might be a philosophical difference with the rails test ethos... or it might just be aesthetic. I am happy to back out this change and fix the tests if you'd rather.
-
由 Ryan Davis 提交于
Happy to squash this before merge. Just separate so I can whittle these down. Most of the problem seems to be centered around the backtrace filter being both for general use and for minitest... and I'm only aware of / addressing minitest issues. If they really need to be separate, then we can make a separate one for minitest.
-
由 Ryan Davis 提交于
Empty backtraces means you didn't run any code, which isn't the case, and goes against the contract that Minitest.backtrace_cleaner expects. This fixes a bug I've seen in a number of reports. It would be nice if this got backported to whatever versions are active, as this keeps coming back on minitest issues.
-
由 John Hawthorn 提交于
Stop creating too many test databases
-
由 Aaron Patterson 提交于
Fix `AR::Relation#where_values_hash` with `HomogeousIn`:
-
由 Lee Quarella 提交于
Issue #39291 In https://github.com/rails/rails/pull/38893 parallel test worker ids were changed to `SecureRandom.uuid` to keep track of inflight work across distributed instances, but negelected to change the worker callbacks to match. This caused a new set of unique test databases are created with every test run. This commit makes the appropriate change to worker callbacks so only one set of of parallel test databases are created.
-
- 15 5月, 2020 11 次提交
-
-
由 Ryuta Kamizono 提交于
`count` is too complex feature in Active Record, it is heavily mangling select values, so it easily hit the ORDER BY with SELECT DISTINCT limitation. https://github.com/rails/rails/blob/35bf86fe838d310833adb283712ce4913447eea7/activerecord/lib/active_record/relation/calculations.rb#L133-L140 https://github.com/rails/rails/blob/35bf86fe838d310833adb283712ce4913447eea7/activerecord/lib/active_record/relation/calculations.rb#L253-L264 But at least in the case of group by, select values are always to be aggregated value and group values, so meaningful order values are originally limited. So in that case, remaining order values should be safe as long as meaningful order values are set by people. Fixes #38936.
-
由 Edouard CHIN 提交于
- Calling `Blog.where(title: ['foo', 'bar']).where_values_hash` now returns an empty hash. This is a regression since 72fd0bae . `Arel::Node::HomogeousIn` isn't a `EqualityNode`, the `WhereClause` didn't had a case for this. I decide to not make `HomogeousIn` inherit from `EqualityNode`, because there is a comment questioning it for `In` https://github.com/rails/rails/blob/57d926a78a6968b9268f4ec1acde608132a1c920/activerecord/lib/arel/nodes.rb#L31 Intead I just modified the `WhereClause` case and implemented `right` on the node which is needed by `where_value_hash` https://github.com/rails/rails/blob/57d926a78a6968b9268f4ec1acde608132a1c920/activerecord/lib/active_record/relation/where_clause.rb#L59
-
由 Ryuta Kamizono 提交于
Type cast aggregations values for table name unqalified column in joins tables
-
由 Ryuta Kamizono 提交于
Follow up of #39292 and #39259.
-
由 Ryuta Kamizono 提交于
Type cast `pluck` values for table name unqalified column in joins tables
-
由 Ryuta Kamizono 提交于
-
由 Ryuta Kamizono 提交于
Allow define scope for Ruby reserved keywords
-
由 Ryuta Kamizono 提交于
Support native RENAME COLUMN syntax for MySQL
-
由 Ryuta Kamizono 提交于
Follow up to #39264, and fixes demonstrated case in #39290. If the column has no type caster and the model don't know the attribute, let's will attempt to lookup cast type from join dependency tree.
-
由 Jonathan Hefner 提交于
Fix wording in rail/engine.rb
-
由 Eric Hayes 提交于
-
- 14 5月, 2020 2 次提交
-
-
由 George Claghorn 提交于
References dfb5a82b.
-
由 Ryuta Kamizono 提交于
For now argument forwarding doesn't allow some keywords like `true` as a method name. To bypass the issue, fallback to `define_method` if method names are Ruby reserved keywords. https://bugs.ruby-lang.org/issues/16854 ```ruby class Works def true(*args) puts(*args) end end Works.new.true 1, 2, 3 # => 1, 2, 3 class WontWork def true(...) puts(...) end end ``` ``` % ruby a.rb a.rb:12: syntax error, unexpected ..., expecting ')' def true(...) a.rb:13: unexpected ... a.rb:15: syntax error, unexpected `end', expecting end-of-input ```
-