rails
rails copied to clipboard
Ruby on Rails
### Motivation / Background As of December, [ActionController::Metal::RateLimiting](https://github.com/rails/rails/blob/main/actionpack/lib/action_controller/metal/rate_limiting.rb) provides rate limiting through the `increment` method of any cache store. RateLimiting relies on a feature of the underlying store. This feature...
Follow up to https://github.com/rails/rails/pull/48295.
When using `add_reference`, PostgreSQL adds a new column and a foreign key separately. For large tables, adding a foreign key leads to problems, because the dbms needs to validate all...
```ruby change_table :users, bulk: true do |t| t.integer :age t.check_constraint "age >= 0" end ``` ### Before ``` (0.5ms) ALTER TABLE "users" ADD "age" integer (0.4ms) ALTER TABLE "users" ADD...
Specifically, `.where([:id] => [])` is now equivalent to `where(:id => [])`. ### Motivation / Background This behaviour fixes `#collection_singular_ids=` for relations with composite query constraints when used in forms, as...
Add a new option `early_expiration` to `ActiveSupport::Cache::Store#fetch` to avoid dog pile effect
### Motivation / Background I encountered an issue that `:race_condition_ttl` can still suffer from dog pile effect in the use case of high intense services because during the period of...
### Motivation / Background Fixes #33155 ### Detail Updates `#load_target` in `ActiveRecord::Associations::CollectionAssociation` and `ActiveRecord::Associations::Association` (which is inherited by `ActiveRecord::Associations::SingularAssociation`) to set the through association target using the middle record when...
# Use WEBP as the default format for representations This pull request updates the `default_variant_format` method in the `representable.rb` file. Previously, the default image format was PNG. With this change,...
Opening a new issue since the old one was marked as stale and I didn't get to it in time (doesn't seem like I can re-open it). https://github.com/rails/rails/issues/31975 @adamlogic confirmed...
When using sharding and the `test` primary config is named differently than `development` primary config, like ```yml development: primary: # can be any name, not necessary 'primary' adapter: sqlite3 database:...