The NetBSD Project

CVS log for pkgsrc/databases/ruby-activerecord80/distinfo

[BACK] Up to [cvs.NetBSD.org] / pkgsrc / databases / ruby-activerecord80

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun Nov 8 15:39:23 2026 UTC (7 days, 12 hours ago) by taca
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +4 -4 lines
www/ruby-rails80: update to 8.0.5.2

Update Ruby on Rails 8.0.x to 8.0.5.2.

8.0.5.2 (2026-11-04)

Including these security fixes.

* GHSA-f3w6-w445-fwh9 Possible arbitrary file write and read in Active
  Storage image analysis (Critical)

* GHSA-v924-7rp8-4mxh Possible arbitrary file read and remote code execution
  in Active Storage video previews, analysis and image processing (High)

* GHSA-wm3x-v3qw-4jh3 Possible Strong Parameters bypass in
  Parameters#each_key in Action Pack (High)

* GHSA-8474-xrp6-wh69 Possible DoS vulnerability in Active Support
  safe_constantize (High)

* GHSA-2p2f-4rq4-gjwc Possible XSS vulnerability in Action View text helpers
  (Medium)

* GHSA-v6rj-xm57-3p59 Possible XSS vulnerability in Action View highlight
  helper (Medium)

* GHSA-rq8q-p985-fjq7 Possible XSS vulnerability in Action View strip_tags
  (Medium)

* GHSA-68p9-83h6-5wpj Possible XSS vulnerability in Action View tag helpers
  (Medium)

* GHSA-rwvh-fw6r-pwvp Possible DoS vulnerability in Action Controller Live
  streaming (Medium)

* GHSA-4v2w-w6g6-f8f8 Possible DoS vulnerability in Active Storage proxy
  mode via storage errors during streaming (Medium)

* GHSA-p2pm-g2h6-7j5j Possible DoS vulnerability in Active Storage filename
  handling (Medium)

* GHSA-3w93-6hmw-whh4 Unsigned Content-Type in Active Storage GCS direct
  uploads with cache_control (Medium)

* GHSA-hfr4-8rjc-97m2 Possible circumvention of file size limits in Active
  Storage direct uploads to Google Cloud Storage (Medium)

* GHSA-2586-8ghr-69fj Possible restoration of destroyed sessions in Action
  Dispatch CacheStore (Medium)

* GHSA-x6mj-8jx9-qhqv Possible sensitive session information leak in Active
  Storage proxy mode (Medium)

* GHSA-r9jg-fmfx-2gv6 Possible cache poisoning in Action Pack content
  negotiation (Medium)

* GHSA-3f4q-8x5m-76v8 Possible local file disclosure in Active Storage video
  previews and analysis (Low)

* GHSA-5957-c7qm-m469 Possible signature replay in Action Mailbox Mailgun
  ingress (Low)

* GHSA-gmj8-hvj3-49mw Missing SameSite attribute on session cookies from
  Action Pack session stores (Low)

Revision 1.6.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 5 15:07:12 2026 UTC (3 months, 1 week ago) by maya
Branches: pkgsrc-2026Q2
Diff to: previous 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6: +4 -4 lines
Pullup ticket #7215 - requested by taca
www/ruby-rails80: Security fix

Revisions pulled up:
- databases/ruby-activerecord80/distinfo                        1.7
- devel/ruby-activejob80/distinfo                               1.7
- devel/ruby-activemodel80/distinfo                             1.7
- devel/ruby-activestorage80/PLIST                              1.2
- devel/ruby-activestorage80/distinfo                           1.7
- devel/ruby-activesupport80/distinfo                           1.7
- devel/ruby-railties80/distinfo                                1.7
- lang/ruby/rails.mk                                            1.192
- mail/ruby-actionmailbox80/distinfo                            1.7
- mail/ruby-actionmailer80/distinfo                             1.7
- textproc/ruby-actiontext80/distinfo                           1.7
- www/ruby-actioncable80/distinfo                               1.7
- www/ruby-actionpack80/distinfo                                1.7
- www/ruby-actionview80/distinfo                                1.7
- www/ruby-rails80/distinfo                                     1.7

---
   Module Name:	pkgsrc
   Committed By:	taca
   Date:		Thu Jul 30 15:23:11 UTC 2026

   Modified Files:
   	pkgsrc/databases/ruby-activerecord80: distinfo
   	pkgsrc/devel/ruby-activejob80: distinfo
   	pkgsrc/devel/ruby-activemodel80: distinfo
   	pkgsrc/devel/ruby-activestorage80: PLIST distinfo
   	pkgsrc/devel/ruby-activesupport80: distinfo
   	pkgsrc/devel/ruby-railties80: distinfo
   	pkgsrc/lang/ruby: rails.mk
   	pkgsrc/mail/ruby-actionmailbox80: distinfo
   	pkgsrc/mail/ruby-actionmailer80: distinfo
   	pkgsrc/textproc/ruby-actiontext80: distinfo
   	pkgsrc/www/ruby-actioncable80: distinfo
   	pkgsrc/www/ruby-actionpack80: distinfo
   	pkgsrc/www/ruby-actionview80: distinfo
   	pkgsrc/www/ruby-rails80: distinfo

   Log Message:
   www/ruby-rails80: update to 8.0.5.1

   Ruby on Rails 8.0.5.1 (2026-07-29)

   Active Storage

   * A possible arbitrary file read and remote code execution in Active Storage
     variant processing (CVE-2026-66066)

Revision 1.7: download - view: text, markup, annotated - select for diffs
Thu Jul 30 15:23:10 2026 UTC (3 months, 2 weeks ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2026Q3-base, pkgsrc-2026Q3
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +4 -4 lines
www/ruby-rails80: update to 8.0.5.1

Ruby on Rails 8.0.5.1 (2026-07-29)

Active Storage

* A possible arbitrary file read and remote code execution in Active Storage
  variant processing (CVE-2026-66066)

Revision 1.5.4.1: download - view: text, markup, annotated - select for diffs
Tue Mar 31 13:37:46 2026 UTC (7 months, 2 weeks ago) by maya
Branches: pkgsrc-2026Q1
Diff to: previous 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5: +4 -4 lines
Pullup ticket #7062 - requested by taca
databases/ruby-activerecord80: Security fix
devel/ruby-activejob80: Security fix
devel/ruby-activemodel80: Security fix
devel/ruby-activestorage80: Security fix
devel/ruby-activesupport80: Security fix
devel/ruby-railties80: Security fix
mail/ruby-actionmailbox80: Security fix
mail/ruby-actionmailer80: Security fix
textproc/ruby-actiontext80: Security fix
www/ruby-actioncable80: Security fix
www/ruby-actionpack80: Security fix
www/ruby-actionview80: Security fix
www/ruby-rails80: Security fix

Revisions pulled up:
- databases/ruby-activerecord80/distinfo                        1.6
- devel/ruby-activejob80/distinfo                               1.6
- devel/ruby-activemodel80/distinfo                             1.6
- devel/ruby-activestorage80/distinfo                           1.6
- devel/ruby-activesupport80/distinfo                           1.6
- devel/ruby-railties80/Makefile                                1.5
- devel/ruby-railties80/distinfo                                1.6
- lang/ruby/rails.mk                                            1.189
- mail/ruby-actionmailbox80/distinfo                            1.6
- mail/ruby-actionmailer80/distinfo                             1.6
- textproc/ruby-actiontext80/distinfo                           1.6
- www/ruby-actioncable80/distinfo                               1.6
- www/ruby-actionpack80/Makefile                                1.6
- www/ruby-actionpack80/distinfo                                1.6
- www/ruby-actionview80/distinfo                                1.6
- www/ruby-rails80/distinfo                                     1.6

---
   Module Name:	pkgsrc
   Committed By:	taca
   Date:		Sun Mar 29 14:23:51 UTC 2026

   Modified Files:
   	pkgsrc/databases/ruby-activerecord80: distinfo
   	pkgsrc/devel/ruby-activejob80: distinfo
   	pkgsrc/devel/ruby-activemodel80: distinfo
   	pkgsrc/devel/ruby-activestorage80: distinfo
   	pkgsrc/devel/ruby-activesupport80: distinfo
   	pkgsrc/devel/ruby-railties80: Makefile distinfo
   	pkgsrc/mail/ruby-actionmailbox80: distinfo
   	pkgsrc/mail/ruby-actionmailer80: distinfo
   	pkgsrc/textproc/ruby-actiontext80: distinfo
   	pkgsrc/www/ruby-actioncable80: distinfo
   	pkgsrc/www/ruby-actionpack80: Makefile distinfo
   	pkgsrc/www/ruby-actionview80: distinfo
   	pkgsrc/www/ruby-rails80: distinfo

   Log Message:
   www/ruby-rails80: update to 8.0.5

   Ruby on Rails 8.0.4.1 (2026-03-23)

   Active Support

   * Reject scientific notation in NumberConverter [CVE-2026-33176]
     Jean Boussier

   * Fix SafeBuffer#% to preserve unsafe status [CVE-2026-33170]
     Jean Boussier

   * Improve performance of NumberToDelimitedConverter [CVE-2026-33169]
     Jean Boussier

   Action View

   * Skip blank attribute names in tag helpers to avoid generating invalid
     HTML.  [CVE-2026-33168]
     Mike Dalessio

   Active Storage

   * Filter user supplied metadata in DirectUploadController [CVE-2026-33173]
     Jean Boussier

   * Configurable maxmimum streaming chunk size
     Makes sure that byte ranges for blobs don't exceed 100mb by default.
     Content ranges that are too big can result in denial of service.
     [CVE-2026-33174]  Gannon McGibbon

   * Limit range requests to a single range [CVE-2026-33658]
     Jean Boussier

   * Prevent path traversal in DiskService.

     DiskService#path_for now raises an InvalidKeyError when passed keys with
     dot segments (".", ".."), or if the resolved path is outside the storage
     root directory.

     #path_for also now consistently raises InvalidKeyError if the key is
     invalid in any way, for example containing null bytes or having an
     incompatible encoding. Previously, the exception raised may have been
     ArgumentError or Encoding::CompatibilityError.

     DiskController now explicitly rescues InvalidKeyError with appropriate
     HTTP status codes.

     [CVE-2026-33195]  Mike Dalessio

   * Prevent glob injection in DiskService#delete_prefixed.
     Escape glob metacharacters in the resolved path before passing to Dir.glob.

     Note that this change breaks any existing code that is relying on
     delete_prefixed to expand glob metacharacters. This change presumes that
     is unintended behavior (as other storage services do not respect these
     metacharacters).

     [CVE-2026-33202]

     Mike Dalessio

   Active Model
   Active Record
   Action Pack
   Active Job
   Action Mailer
   Action Cable
   Action Mailbox
   Action Text
   Railties

   * No change except version.

   8.0.5 (2026-03-24)

   Changes are too many to write here, please refer:
   <https://github.com/rails/rails/releases/tag/v8.0.5>.

---
   Module Name:	pkgsrc
   Committed By:	taca
   Date:		Sun Mar 29 14:28:13 UTC 2026

   Modified Files:
   	pkgsrc/lang/ruby: rails.mk

   Log Message:
   lang/ruby: update rails80 to 8.0.5

   Make sure to update rails80 to 8.0.5.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Mar 29 14:23:50 2026 UTC (7 months, 2 weeks ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2026Q2-base
Branch point for: pkgsrc-2026Q2
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +4 -4 lines
www/ruby-rails80: update to 8.0.5

Ruby on Rails 8.0.4.1 (2026-03-23)

Active Support

* Reject scientific notation in NumberConverter [CVE-2026-33176]
  Jean Boussier

* Fix SafeBuffer#% to preserve unsafe status [CVE-2026-33170]
  Jean Boussier

* Improve performance of NumberToDelimitedConverter [CVE-2026-33169]
  Jean Boussier

Action View

* Skip blank attribute names in tag helpers to avoid generating invalid
  HTML.  [CVE-2026-33168]
  Mike Dalessio

Active Storage

* Filter user supplied metadata in DirectUploadController [CVE-2026-33173]
  Jean Boussier

* Configurable maxmimum streaming chunk size
  Makes sure that byte ranges for blobs don't exceed 100mb by default.
  Content ranges that are too big can result in denial of service.
  [CVE-2026-33174]  Gannon McGibbon

* Limit range requests to a single range [CVE-2026-33658]
  Jean Boussier

* Prevent path traversal in DiskService.

  DiskService#path_for now raises an InvalidKeyError when passed keys with
  dot segments (".", ".."), or if the resolved path is outside the storage
  root directory.

  #path_for also now consistently raises InvalidKeyError if the key is
  invalid in any way, for example containing null bytes or having an
  incompatible encoding. Previously, the exception raised may have been
  ArgumentError or Encoding::CompatibilityError.

  DiskController now explicitly rescues InvalidKeyError with appropriate
  HTTP status codes.

  [CVE-2026-33195]  Mike Dalessio

* Prevent glob injection in DiskService#delete_prefixed.
  Escape glob metacharacters in the resolved path before passing to Dir.glob.

  Note that this change breaks any existing code that is relying on
  delete_prefixed to expand glob metacharacters. This change presumes that
  is unintended behavior (as other storage services do not respect these
  metacharacters).

  [CVE-2026-33202]

  Mike Dalessio

Active Model
Active Record
Action Pack
Active Job
Action Mailer
Action Cable
Action Mailbox
Action Text
Railties

* No change except version.

8.0.5 (2026-03-24)

Changes are too many to write here, please refer:
<https://github.com/rails/rails/releases/tag/v8.0.5>.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Mon Nov 3 08:51:48 2025 UTC (12 months, 1 week ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2026Q1-base, pkgsrc-2025Q4-base, pkgsrc-2025Q4
Branch point for: pkgsrc-2026Q1
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +4 -4 lines
www/ruby-rails80: update to 8.0.4

8.0.4 (2025-10-28)

Active Support

* Fix Enumerable#sole to return the full tuple instead of just the first
  element of the tuple.  [Olivier Bellone]

* Fix parallel tests hanging when worker processes die abruptly.

  Previously, if a worker process was killed (e.g., OOM killed, kill -9)
  during parallel test execution, the test suite would hang forever waiting
  for the dead worker.  [Joshua Young]

* Fix NameError when class_attribute is defined on instance singleton classes.

  Previously, calling class_attribute on an instance's singleton class would
  raise a NameError when accessing the attribute through the instance.

    object = MyClass.new
    object.singleton_class.class_attribute :foo, default: "bar"
    object.foo # previously raised NameError, now returns "bar"

  [Joshua Young]

Active Record

* Fix SQLite3 data loss during table alterations with CASCADE foreign keys.

  When altering a table in SQLite3 that is referenced by child tables with
  ON DELETE CASCADE foreign keys, ActiveRecord would silently delete all
  data from the child tables.  This occurred because SQLite requires table
  recreation for schema changes, and during this process the original table
  is temporarily dropped, triggering CASCADE deletes on child tables.

  The root cause was incorrect ordering of operations.  The original code
  wrapped disable_referential_integrity inside a transaction, but PRAGMA
  foreign_keys cannot be modified inside a transaction in SQLite -
  attempting to do so simply has no effect.  This meant foreign keys
  remained enabled during table recreation, causing CASCADE deletes to fire.

  The fix reverses the order to follow the official SQLite 12-step ALTER
  TABLE procedure: disable_referential_integrity now wraps the transaction
  instead of being wrapped by it.  This ensures foreign keys are properly
  disabled before the transaction starts and re-enabled after it commits,
  preventing CASCADE deletes while maintaining data integrity through atomic
  transactions.  [Ruy Rocha]

* Add support for bound SQL literals in CTEs.  [Nicolas Bachschmidt]

* Fix belongs_to associations not to clear the entire composite primary key.

  When clearing a belongs_to association that references a model with
  composite primary key, only the optional part of the key should be
  cleared.  [zzak]

* Fix invalid records being autosaved when distantly associated records are
  marked for deletion.  [Ian Terrell, axlekb AB]

Action View

* Restore add_default_name_and_id method.  [Hartley McGuire]

Action Pack

* Submit test requests using as: :html with Content-Type:
  x-www-form-urlencoded  [Sean Doyle]

Active Model
Active Job
Action Mailer
Action Cable
Active Storage
Action Mailbox
Action Text
Railties

* No changes.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Sep 23 04:17:02 2025 UTC (13 months, 3 weeks ago) by taca
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +4 -4 lines
databases/ruby-activerecord80: update to 8.0.3

8.0.3 (2025-09-22)

Active Record

* Fix query cache for pinned connections in multi threaded transactional
  tests

  When a pinned connection is used across separate threads, they now use a
  separate cache store for each thread.

  This improve accuracy of system tests, and any test using multiple
  threads.

  Heinrich Lee Yu, Jean Boussier

* Don't add id_value attribute alias when attribute/column with that name
  already exists.

  Rob Lewis

* Fix false positive change detection involving STI and polymorphic has one
  relationships.

  Polymorphic has_one relationships would always be considered changed when
  defined in a STI child class, causing nedless extra autosaves.

  David Fritsch

* Skip calling PG::Connection#cancel in cancel_any_running_query when using
  libpq >= 18 with pg < 1.6.0, due to incompatibility.  Rollback still runs,
  but may take longer.

  Yasuo Honda, Lars Kanis

* Fix stale association detection for polymorphic belongs_to.

    Florent Beaurain, Thomas Crambert

* Fix removal of PostgreSQL version comments in structure.sql for latest
  PostgreSQL versions which include \restrict

  Brendan Weibrecht

* Allow setting schema_format in database configuration.

	primary:
	  schema_format: ruby

  Useful in multi-database setups to have different formats per-database.

  T S Vallender

* Use ntuples to populate row_count instead of count for Postgres

  Jonathan Calvert

* Fix #merge with #or or #and and a mixture of attributes and SQL strings
  resulting in an incorrect query.

	base = Comment.joins(:post).where(user_id: 1).where("recent = 1")
	puts base.merge(base.where(draft: true).or(Post.where(archived: true))).to_sql

  Before:

	SELECT "comments".* FROM "comments"
	INNER JOIN "posts" ON "posts"."id" = "comments"."post_id"
	WHERE (recent = 1)
	AND (
	  "comments"."user_id" = 1
	  AND (recent = 1)
	  AND "comments"."draft" = 1
	  OR "posts"."archived" = 1
	)

  After:

	SELECT "comments".* FROM "comments"
	INNER JOIN "posts" ON "posts"."id" = "comments"."post_id"
	WHERE "comments"."user_id" = 1
	AND (recent = 1)
	AND (
	  "comments"."user_id" = 1
	  AND (recent = 1)
	  AND "comments"."draft" = 1
	  OR "posts"."archived" = 1
	)

  Joshua Young

* Fix inline has_and_belongs_to_many fixtures for tables with composite
  primary keys.

  fatkodima

* Fix migration log message for down operations.

  Bernardo Barreto

* Prepend extra_flags in postgres' structure_load

  When specifying structure_load_flags with a postgres adapter, the flags
  were appended to the default flags, instead of prepended.  This caused
  issues with flags not being taken into account by postgres.

  Alice Loeser

* Fix annotate comments to propagate to update_all/delete_all.

  fatkodima

* Fix checking whether an unpersisted record is include?d in a strictly
  loaded has_and_belongs_to_many association.

  Hartley McGuire

* create_or_find_by will now correctly rollback a transaction.

  When using create_or_find_by, raising a ActiveRecord::Rollback error in a
  after_save callback had no effect, the transaction was committed and a
  record created.

  Edouard Chin

* Gracefully handle Timeout.timeout firing during connection configuration.

  Use of Timeout.timeout could result in improperly initialized database
  connection.

  This could lead to a partially configured connection being used, resulting
  in various exceptions, the most common being with the PostgreSQLAdapter
  raising undefined method 'key?' for nil or TypeError: wrong argument type
  nil (expected PG::TypeMap).

  Jean Boussier

* Fix stale state for composite foreign keys in belongs_to associations.

  Varun Sharma

Action View

* Fix label with for option not getting prefixed by form namespace value

  Abeid Ahmed, Hartley McGuire

* Fix javascript_include_tag type option to accept either strings and
  symbols.

	javascript_include_tag "application", type: :module
	javascript_include_tag "application", type: "module"

  Previously, only the string value was recognized.

  Jean Boussier

* Fix excerpt helper with non-whitespace separator.

  Jonathan Hefner

Revision 1.3: download - view: text, markup, annotated - select for diffs
Thu Aug 14 15:25:06 2025 UTC (15 months ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2025Q3-base, pkgsrc-2025Q3
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +4 -4 lines
www/ruby-rails80: update to 8.0.2.1

Ruby on Rails 8.0.2.1 (2025-08-13)

Active Record

* Call inspect on ids in RecordNotFound error [CVE-2025-55193]
  Gannon McGibbon, John Hawthorn

Active Storage

* Remove dangerous transformations [CVE-2025-24293]
  Zack Deveau

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Mar 16 15:26:34 2025 UTC (20 months ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2025Q2-base, pkgsrc-2025Q2, pkgsrc-2025Q1-base, pkgsrc-2025Q1
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +4 -4 lines
databases/ruby-activerecord80: update to 8.0.2

8.0.2 (2025/03/12)

* Fix inverting rename_enum_value when :from/:to are provided.  [fatkodima]
* Prevent persisting invalid record.  [Edouard Chin]
* Fix inverting drop_table without options.  [fatkodima]
* Fix count with group by qualified name on loaded relation.  [Ryuta
  Kamizono]
* Fix sum with qualified name on loaded relation.  [Chris Gunther]
* The SQLite3 adapter quotes non-finite Numeric values like "Infinity" and
  "NaN".  [Mike Dalessio]
* Handle libpq returning a database version of 0 on no/bad connection in
  PostgreSQLAdapter.
  Before, this version would be cached and an error would be raised during
  connection configuration when comparing it with the minimum required
  version for the adapter.  This meant that the connection could never be
  successfully configured on subsequent reconnection attempts.
  Now, this is treated as a connection failure consistent with libpq,
  raising a ActiveRecord::ConnectionFailed and ensuring the version isn't
  cached, which allows the version to be retrieved on the next connection
  attempt.  [Joshua Young, Rian McGuire]
* Fix error handling during connection configuration.
  Active Record wasn't properly handling errors during the connection
  configuration phase.  This could lead to a partially configured connection
  being used, resulting in various exceptions, the most common being with
  the PostgreSQLAdapter raising undefined method key?' for nilorTypeError:
  wrong argument type nil (expected PG::TypeMap)'.  [Jean Boussier]
* Fix a case where a non-retryable query could be marked retryable.
  [Hartley McGuire]
* Handle circular references when autosaving associations.  [zzak]
* PoolConfig no longer keeps a reference to the connection class.
  Keeping a reference to the class caused subtle issues when combined with
  reloading in development. Fixes #54343. [ Mike Dalessio]
* Fix SQL notifications sometimes not sent when using async queries.

    Post.async_count
    ActiveSupport::Notifications.subscribed(->(*) { "Will never reach here" }) do
      Post.count
    end

  In rare circumstances and under the right race condition, Active Support
  notifications would no longer be dispatched after using an asynchronous
  query.  This is now fixed.  [Edouard Chin]
* Fix support for PostgreSQL enum types with commas in their name.  [Arthur
  Hess]
* Fix inserts on MySQL with no RETURNING support for a table with multiple
  auto populated columns.  [Nikita Vasilevsky]
* Fix joining on a scoped association with string joins and bind parameters.

    class Instructor < ActiveRecord::Base
      has_many :instructor_roles, -> { active }
    end

    class InstructorRole < ActiveRecord::Base
      scope :active, -> {
	joins("JOIN students ON instructor_roles.student_id = students.id")
	.where(students { status: 1 })
      }
    end

    Instructor.joins(:instructor_roles).first

  The above example would result in ActiveRecord::StatementInvalid because
  the active scope bind parameters would be lost.  [Jean Boussier]
* Fix a potential race condition with system tests and transactional
  fixtures.  [Sjoerd Lagarde]
* Fix autosave associations to no longer validated unmodified associated
  records.
  Active Record was incorrectly performing validation on associated record
  that weren't created nor modified as part of the transaction:

    Post.create!(author: User.find(1)) # Fail if user is invalid

  [Jean Boussier]
* Remember when a database connection has recently been verified (for two
  seconds, by default), to avoid repeated reverifications during a single
  request.
  This should recreate a similar rate of verification as in Rails 7.1, where
  connections are leased for the duration of a request, and thus only
  verified once.  [Matthew Draper]

Revision 1.1: download - view: text, markup, annotated - select for diffs
Thu Jan 2 07:07:56 2025 UTC (22 months, 1 week ago) by taca
Branches: MAIN
databases/ruby-activerecord80: add package version 8.0.1

Active Record -- Object-relational mapping in Rails

Active Record connects classes to relational database tables to establish an
almost zero-configuration persistence layer for applications.  The library
provides a base class that, when subclassed, sets up a mapping between the
new class and an existing table in the database.  In the context of an
application, these classes are commonly referred to as *models*.  Models can
also be connected to other models; this is done by defining *associations*.

Active Record relies heavily on naming in that it uses class and association
names to establish mappings between respective database tables and foreign
key columns.  Although these mappings can be defined explicitly, it's
recommended to follow naming conventions, especially when getting started
with the library.

This is for Ruby on Rails 8.0.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>