rails
rails copied to clipboard
Ruby on Rails
### Steps to reproduce - Setup a new Rails api_only app with MiniTest - Write a controller with `index` and `create` actions (and respective routes) - Write an `ActionDispatch::IntegrationTest` to...
### Steps to reproduce This seems like it's the same as #28324, but I'm still seeing the issue in Rails 7. ```ruby # frozen_string_literal: true require "bundler/inline" gemfile(true) do source...
Follow-up to #40379, #42524, and #43445. The logic to associate records with a `CollectionAssociation` when using `has_many` inversing has become increasingly complex. Prior to this commit, we defined an "add...
### Summary Currently, when for some reason we need to change the app secret key, ActiveStorage's previously generated urls will stop working. By supporting rotation in the ActiveStorage verifier, we...
This adds a `Rails.application.deprecators` method that returns an enhanced collection of deprecators. Individual deprecators can be stored and retrieved from the collection: ```ruby Rails.application.deprecators[:my_gem] = ActiveSupport::Deprecation.new("2.0", "MyGem") Rails.application.deprecators[:other_gem] = ActiveSupport::Deprecation.new("3.0",...
With the universal adoption of UTF-8 in browsers, user facing text can use more optimal Unicode typography. In digital and print design, using RIGHT SINGLE QUOTATION MARK (U+2019) is normally...
### Summary Fixes: https://github.com/rails/rails/issues/45405 ### Other Information This is what I came up with. Essentially, it allows specifying `attachment_service` when defining `has_rich_text` association on a model. Not sure how to...
Previously, the method always asserts the status is `:redirect` which allows for any kind of 3XX response. However, sometimes it is worthwhile to precise the status code of the redirect....
### Summary The presence of method_missing on Duration can lead to some very confusing behavior: ```ruby 1.year.days # => 31556952 Days ``` Methods to convert from duration to a specific...
### Steps to reproduce Calling the application with different values for `HTTP_HOST` and `HTTP_X_FORWARDED_HOST` while HostAuthorization is enabled (i.e. `config.hosts` is set/active) while at least HTTP_HOST is **not** present in...