gems activerecord 7.0.9

latest releases: 8.1.1, 8.0.4, 7.2.3...
one day ago

Active Support

  • Fix ActiveSupport::Notifications.publish_event to preserve units.

    This solves the incorrect reporting of time spent running Active Record
    asynchronous queries (by a factor 1000).

    Jean Boussier

  • Fix ActiveSupport::Deprecation to handle blaming generated code

    Jean Boussier, fatkodima

  • Fix #to_fs(:human_size) to correctly work with negative numbers.

    Earlopain

  • Add bigdecimal as Active Support dependency that is a bundled gem candidate for Ruby 3.4.

    bigdecimal 3.1.4 or higher version will be installed.
    Ruby 2.7 and 3.0 users who want bigdecimal version 2.0.0 or 3.0.0 behavior as a default gem,
    pin the bigdecimal version in your application Gemfile.

    Koichi ITO

  • Ensure {down,up}case_first returns non-frozen string.

    Jonathan Hefner

  • Add drb, mutex_m and base64 that are bundled gem candidates for Ruby 3.4

    Yasuo Honda

  • Fix delete_matched for file cache store to work with keys longer than the
    max filename size.

    fatkodima and Jonathan Hefner

  • Fix MemoryStore to prevent race conditions when incrementing or decrementing.

    Pierre Jambet

  • Fix MemoryStore to preserve entries TTL when incrementing or decrementing

    This is to be more consistent with how MemCachedStore and RedisCacheStore behaves.

    Jean Boussier

  • NumberHelper: handle objects responding to_d.

    fatkodima

  • NumberHelper: handle very large numbers.

    Alex Ghiculescu, fatkodima

  • Fix Range#overlaps? not taking empty ranges into account on Ruby < 3.3

    Nobuyoshi Nakada, Shouichi Kamiya, Hartley McGuire

Active Model

  • No changes.

Active Record

  • Fix an issue that could cause database connection leaks

    If Active Record successfully connected to the database, but then failed
    to read the server informations, the connection would be leaked until the
    Ruby garbage collector triggers.

    Jean Boussier

  • Fix single quote escapes on default generated MySQL columns

    MySQL 5.7.5+ supports generated columns, which can be used to create a column that is computed from an expression.

    Previously, the schema dump would output a string with double escapes for generated columns with single quotes in the default expression.

    This would result in issues when importing the schema on a fresh instance of a MySQL database.

    Now, the string will not be escaped and will be valid Ruby upon importing of the schema.

    Yash Kapadia

  • Fix Relation#transaction to not apply a default scope

    The method was incorrectly setting a default scope around its block:

    Post.where(published: true).transaction do
      Post.count # SELECT COUNT(*) FROM posts WHERE published = FALSE;
    end

    Jean Boussier

  • Fix renaming primary key index when renaming a table with a UUID primary key
    in PostgreSQL.

    fatkodima

  • Fix where(field: values) queries when field is a serialized attribute
    (for example, when field uses ActiveRecord::Base.serialize or is a JSON
    column).

    João Alves

  • Don't mark Float::INFINITY as changed when reassigning it

    When saving a record with a float infinite value, it shouldn't mark as changed

    Maicol Bentancor

  • ActiveRecord::Base.table_name now returns nil instead of raising
    "undefined method abstract_class? for Object:Class".

    a5-stable

  • Fix upserting for custom :on_duplicate and :unique_by consisting of all
    inserts keys.

    fatkodima

  • Fix NoMethodError when casting a PostgreSQL money value that uses a
    comma as its radix point and has no leading currency symbol. For example,
    when casting "3,50".

    Andreas Reischuck and Jonathan Hefner

  • Fix duplicate quoting for check constraint expressions in schema dump when using MySQL

    A check constraint with an expression, that already contains quotes, lead to an invalid schema
    dump with the mysql2 adapter.

    Fixes #42424.

    Felix Tscheulin

  • Fix MySQL expression index dumping with escaped quotes.

    fatkodima

  • Fix uniqueness validation on association not using overridden primary key.

    fatkodima

Action View

  • Fix the number_to_human_size view helper to correctly work with negative numbers.

    Earlopain

Action Pack

  • Fix ActionDispatch::Executor middleware to report errors handled by ActionDispatch::ShowExceptions.

    In the default production environment, ShowExceptions rescue uncaught errors
    and returns a response. Because if this the executor wouldn't report production
    errors with the default Rails configuration.

    Jean Boussier

  • Add racc as a dependency since it will become a bundled gem in Ruby 3.4.0

    Hartley McGuire

Active Job

  • Preserve the serialized timezone when deserializing ActiveSupport::TimeWithZone arguments.

    Joshua Young

Action Mailer

  • No changes.

Action Cable

  • No changes.

Active Storage

  • Fix ActiveStorage::Representations::ProxyController not returning the proper
    preview image variant for previewable files.

    Chedli Bourguiba

  • Make untracked variants obey config.active_storage.content_types_to_serve_as_binary
    and config.active_storage.content_types_allowed_inline.

    Chedli Bourguiba and Jonathan Hefner

  • Fix direct upload forms when submit button contains nested elements.

    Marc Köhlbrugge

  • Prevent ActiveRecord::StrictLoadingViolationError when strict loading is
    enabled and the variant of an Active Storage preview has already been
    processed (for example, by calling ActiveStorage::Preview#url).

    Jonathan Hefner

  • Fix variants not included when eager loading multiple records containing a single attachment

    When using the with_attached_#{name} scope for a has_one_attached relation,
    attachment variants were not eagerly loaded.

    Russell Porter

Action Mailbox

  • No changes.

Action Text

  • No changes.

Railties

  • No changes.

Guides

  • No changes.

Don't miss a new activerecord release

NewReleases is sending notifications on new releases.