rails/activerecord/lib
Pierre Jambet 3d68d224a3
Add materialized? to NullTransaction
The NullTransaction implements the null object pattern for the
Transaction class, but it was missing the `materialized?` method.

This caused issues in cases where we'd want to check if the current
transaction is materialized, where we'd need to check if the connection
is open first:

```ruby
current_transaction = ActiveRecord::Base.connection.current_transaction
current_transaction.open? && current_transaction.materialized?
```

With this change we can skip the extra check on `open?`

```ruby
current_transaction = ActiveRecord::Base.connection.current_transaction
current_transaction.materialized?
```
2023-10-04 21:04:47 -04:00
..
active_record Add materialized? to NullTransaction 2023-10-04 21:04:47 -04:00
arel Merge pull request #48095 from ippachi/triple-dot-range-unscope 2023-09-04 17:16:25 +09:00
rails/generators Simplify the implementation to register the correct source_path for the migration template 2023-05-24 22:54:12 +00:00
active_record.rb Change has_secure_token default to on: :initialize 2023-09-01 20:17:22 +00:00
arel.rb Fix a code block in the Arel documentation 2023-05-06 18:57:12 -07:00