github rails/rails v7.0.5

15 days ago

Active Support

  • Fixes TimeWithZone ArgumentError.

    Niklas Häusele

Active Model

  • No changes.

Active Record

  • Type cast #attribute_changed? :from and :to options.

    Andrew Novoselac

  • Fix index_exists? when column is an array.

    Eileen M. Uchitelle

  • Handle Date objects for PostgreSQL timestamptz columns.

    Alex Ghiculescu

  • Fix collation for changing column to non-string.

    Hartley McGuire

  • Map through subtype in PostgreSQL::OID::Array.

    Jonathan Hefner

  • Store correct environment in internal_metadata when run rails db:prepare.


  • Make sure ActiveRecord::Relation#sum works with objects that implement #coerce without deprecation.

    Alex Ghiculescu

  • Fix retrieving foreign keys referencing tables named like keywords in PostgreSQL and MySQL.


  • Support UUIDs in Disable Joins.

    Samuel Cochran

  • Fix Active Record's explain for queries starting with comments.


  • Fix incorrectly preloading through association records when middle association has been loaded.

    Joshua Young

  • Fix where.missing and where.associated for parent/child associations.


  • Fix Enumerable#in_order_of to preserve duplicates.


  • Fix autoincrement on primary key for mysql.

    Eileen M. Uchitelle

  • Restore ability to redefine column in create_table for Rails 5.2 migrations.


  • Fix schema cache dumping of virtual columns.


  • Fix Active Record grouped calculations on joined tables on column present in both tables.


  • Fix mutation detection for serialized attributes backed by binary columns.

    Jean Boussier

  • Fix a bug where using groups and counts with long table names would return incorrect results.

    Shota Toguchi, Yusaku Ono

  • Fix erroneous nil default precision on virtual datetime columns.

    Prior to this change, virtual datetime columns did not have the same
    default precision as regular datetime columns, resulting in the following
    being erroneously equivalent:

    t.virtual :name, type: datetime,                 as: "expression"
    t.virtual :name, type: datetime, precision: nil, as: "expression"

    This change fixes the default precision lookup, so virtual and regular
    datetime column default precisions match.

    Sam Bostock

  • Fix a case where the query cache can return wrong values. See #46044

    Aaron Patterson

Action View

  • FormBuilder#id finds id set by form_for and form_with.

    Matt Polito

  • Allow all available locales for template lookups.

    Ben Dilley

  • Choices of select can optionally contain html attributes as the last element
    of the child arrays when using grouped/nested collections

    <%= :foo, [["North America", [["United States","US"],["Canada","CA"]], { disabled: "disabled" }]] %>
    # => <select><optgroup label="North America" disabled="disabled"><option value="US">United States</option><option value="CA">Canada</option></optgroup></select>

    Chris Gunther

Action Pack

  • Do not return CSP headers for 304 Not Modified responses.

    Tobias Kraze

  • Fix EtagWithFlash when there is no Flash middleware available.


  • Fix content-type header with send_stream.

    Elliot Crosby-McCullough

  • Address Selenium :capabilities deprecation warning.

    Ron Shinall

  • Fix cookie domain for domain: all on two letter single level TLD.

    John Hawthorn

  • Don't double log the controller, action, or namespaced_controller when using ActiveRecord::QueryLog

    Previously if you set config.active_record.query_log_tags to an array that included
    :controller, :namespaced_controller, or :action, that item would get logged twice.
    This bug has been fixed.

    Alex Ghiculescu

  • Rescue EOFError exception from rack on a multipart request.

    Nikita Vasilevsky

  • Rescue JSON::ParserError in Cookies json deserializer to discards marshal dumps:

    Without this change, if action_dispatch.cookies_serializer is set to :json and
    the app tries to read a :marshal serialized cookie, it would error out which wouldn't
    clear the cookie and force app users to manually clear it in their browser.

    (See #45127 for original bug discussion)

    Nathan Bardoux

Active Job

  • Make delayed job display_name failsafe.


  • Don't double log the job when using ActiveRecord::QueryLog

    Previously if you set config.active_record.query_log_tags to an array that included
    :job, the job name would get logged twice. This bug has been fixed.

    Alex Ghiculescu

Action Mailer

  • No changes.

Action Cable

  • Restore Action Cable Redis pub/sub listener on connection failure.

    Vladimir Dementyev

Active Storage

  • No changes.

Action Mailbox

  • No changes.

Action Text

  • Fix ActionText::Attachable#as_json.

    Alexandre Ruban


  • Add puma app server to Gemfile in order to start test/dummy.


  • Rails console now disables IRB's autocompletion feature in production by default.

    Setting IRB_USE_AUTOCOMPLETE=true can override this default.

    Stan Lo

  • Send 303 See Other status code back for the destroy action on newly generated
    scaffold controllers.

    Tony Drake

Don't miss a new rails release

NewReleases is sending notifications on new releases.