CARVIEW |
Select Language
HTTP/2 200
date: Thu, 31 Jul 2025 11:18:21 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"28fa579010f5370b718f7bbc47643ca1"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=hzurcASKeX08BEuvpEKz4iMP58lhJSIuIrfKlWAafvX2DNfNj%2BMwphrYwKodFy3inzG8TVZGGs5HXbyopbo1o7fqa4%2FunR9YXLTWbS7QSV7W4pd8DqVR5OC04QWf0gfF9KnmD0fVOdR6jBsDTW2HhbOdvKRbNTXIzvaqQQedZfM4P9%2FhcVWVB0RkpYQD784cTUfylNWiSH6fFIhIWwr9wc9puDOw6VnqZDjaTrZS0inC3wEMDme7u%2FtuKT2hbc%2FFf5G2t6ZjyHHZDecqotsmOg%3D%3D--6fXHo0YnqGIq8N2S--B9Lc36qZPNA6GkTkGPreog%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1783539251.1753960701; Path=/; Domain=github.com; Expires=Fri, 31 Jul 2026 11:18:21 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Fri, 31 Jul 2026 11:18:21 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 8AD4:33DAA7:8F4212:AB6D79:688B50FD
Releases Β· AaronLasseigne/active_interaction Β· GitHub
02 Feb 23:37
Loading
23 Nov 21:51
Loading
06 May 21:37
Loading
22 Oct 03:00
Loading
01 Sep 00:53
Loading
28 Jul 02:23
Loading
24 Jun 02:02
Loading
30 Dec 02:12
Loading
14 Oct 00:23
Loading
11 Jul 18:26
Loading
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 143
Releases: AaronLasseigne/active_interaction
Releases Β· AaronLasseigne/active_interaction
v5.5.0
Compare
Added
- Support for Ruby 3.4.
Fixed
- OStruct was listed as a development dependency instead of a runtime dependency.
The need for OStruct has been removed entirely.
Assets 2
v5.4.0
Compare
Added
- #579 Support for Rails 8. Thanks @bvalentino!
Fixed
- #577 Manually pull in the
ostruct
gem since it's being removed from stdlib.
Assets 2
1 person reacted
v5.3.0
Compare
Assets 2
v5.2.0
Compare
Added
- Added translation for Spanish. Thanks @matiasasis!
Fixed
- #545 - Arrays passed in are no longer modified. Thanks @jonkgrimes!
Assets 2
v5.1.1
Compare
Assets 2
v5.1.0
Compare
Assets 2
v5.0.0
Compare
Changed
- Drop support for JRuby.
- Drop support for Ruby 2.5 and 2.6, adding support for 3.1
- Drop support for Rails 5.0 and 5.1
ActiveInteraction::Inputs
no longer inherits fromHash
though it still has most of the methods
provided byHash
(methods that write were removed).- Removed
Filter#clean
(useFilter#process
and call#value
on the result) - The
given?
method has been moved ontoinputs
. (see Upgrade section below) - #503 - The record filter now treats blank strings value as
nil
. This was missed in the 4.0 update. - The
type_check
callback has been renamed tofilter
to better match the reality of what it does.
(see Upgrade section below) ActiveIneraction::FilterColumn
is nowActiveInteraction::Filter::Column
- Errors on the array filter will now be indexed if the Rails config
index_nested_attribute_errors
istrue
or the:index_errors
option is set totrue
. The:index_errors
option always overrides
the Rails config. - Invalid nested errors (
:invalid_nested
) are gone. Instead the nested errors will appear as they would
in Rails if they were ahas_many
relationship being assigned attributes through a parent.
(see Upgrade section below)
Added
Filter#process
which returns anInput
.
Fixed
- When passing an
ActiveRecord::Relation
in an array filter with no inner
filter, the value returned was anActiveRecord::Relation
instead of an
Array.
Upgrading
given?
The given?
method can now be found on inputs
. It works the same as before.
# 4.1
class Example < ActiveInteraction::Base
string :name, default: nil
def execute
given?(:name)
end
end
# 5.0
class Example < ActiveInteraction::Base
string :name, default: nil
def execute
inputs.given?(:name)
end
end
Filter Callback
You'll need to rename any :type_check
callbacks to :filter
.
# 4.1
set_callback :type_check, :before, -> { puts 'before type check' }
# 5.0
set_callback :filter, :before, -> { puts 'before type check' }
Nested Hash Errors
Nested hash errors no longer add an error as through it happened on the hash.
They now use the error in its original form and attach the name of the hash to
the error. It is also not limited to returning one error.
class HashInteraction < ActiveInteraction::Base
hash :mailing_lists do
boolean :marketing
boolean :product_updates
end
def execute
# ...
end
end
> outcome = HashInteraction.run(mailing_lists: {})
# 4.1
> outcome.errors.details
# => {:mailing_lists=>[{:error=>:invalid_nested, :name=>"\"marketing\"", :value=>"nil"}]},
> outcome.errors.messages
# => {:mailing_lists=>["has an invalid nested value (\"marketing\" => nil)"]}
> outcome.errors.full_messages
# => ["Mailing lists has an invalid nested value (\"marketing\" => nil)"]
# 5.0
> outcome.errors.details
# => {:"mailing_lists.marketing"=>[{:error=>:missing}], :"mailing_lists.product_updates"=>[{:error=>:missing}]}
> outcome.errors.messages
# => {:"mailing_lists.marketing"=>["is required"], :"mailing_lists.product_updates"=>["is required"]}
> outcome.errors.full_messages
# => ["Mailing lists marketing is required", "Mailing lists product updates is required"]
I18n can handle these values the same as nested values in Rails:
en:
active_interaction:
attributes:
hash_interaction/mailing_lists:
marketing: 'Mailing list "Marketing"'
product_updates: 'Mailing list "Product Updates"'
Using the same example from above:
> outcome.errors.full_messages
# => ["Mailing list \"Marketing\" is required", "Mailing list \"Product Updates\" is required"]
Assets 2
5 people reacted
v4.1.0
Compare
Assets 2
v4.0.6
Compare
Fixed
- #515 - Filters nested in arrays should accept default values as indicated in the documentation.
Assets 2
v4.0.5
Compare
Assets 2
Previous Next
You canβt perform that action at this time.