diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index deffd736..13285036 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -2,9 +2,9 @@ name: ESLint on: push: - branches: [ main ] + branches: [ 22-stable ] pull_request: - branches: [ main ] + branches: [ 22-stable ] permissions: contents: read diff --git a/.github/workflows/javascript.yml b/.github/workflows/javascript.yml index dcd46126..779cfee7 100644 --- a/.github/workflows/javascript.yml +++ b/.github/workflows/javascript.yml @@ -2,9 +2,9 @@ name: JavaScript tests on: push: - branches: [ main ] + branches: [ 22-stable ] pull_request: - branches: [ main ] + branches: [ 22-stable ] permissions: contents: read diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index 84754452..55dbb847 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -2,9 +2,9 @@ name: Rubocop on: push: - branches: [ main ] + branches: [ 22-stable ] pull_request: - branches: [ main ] + branches: [ 22-stable ] permissions: contents: read diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index a3c97e5d..b2508494 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -2,9 +2,9 @@ name: Ruby tests on: push: - branches: [ main ] + branches: [ 22-stable ] pull_request: - branches: [ main ] + branches: [ 22-stable ] permissions: contents: read diff --git a/Appraisals b/Appraisals index bcbe6612..dec0218c 100644 --- a/Appraisals +++ b/Appraisals @@ -3,11 +3,13 @@ appraise 'rails-6.1' do gem 'rails', '~> 6.1.0' gem 'sqlite3', '~> 1.7' + gem 'concurrent-ruby', '< 1.3.5' # Ref: rails/rails#54260 end appraise 'rails-7.0' do gem 'rails', '~> 7.0.0' gem 'sqlite3', '~> 1.7' + gem 'concurrent-ruby', '< 1.3.5' # Ref: rails/rails#54260 end appraise 'rails-7.1' do diff --git a/CHANGELOG.md b/CHANGELOG.md index 99f64d17..5bd134a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 22.3.1 / 2025-01-29 + +* [BUGFIX] `form_with` default argument exception on Rails 8.0 ([#974](https://github.com/DavyJonesLocker/client_side_validations/issues/974)) + ## 22.3.0 / 2024-11-12 * [FEATURE] Rails 8.0 compatibility diff --git a/dist/client-side-validations.esm.js b/dist/client-side-validations.esm.js index 990a14ef..f44672ef 100644 --- a/dist/client-side-validations.esm.js +++ b/dist/client-side-validations.esm.js @@ -1,6 +1,6 @@ /*! * Client Side Validations JS - v0.4.0 (https://github.com/DavyJonesLocker/client_side_validations) - * Copyright (c) 2024 Geremia Taglialatela, Brian Cardarella + * Copyright (c) 2025 Geremia Taglialatela, Brian Cardarella * Licensed under MIT (https://opensource.org/licenses/mit-license.php) */ diff --git a/dist/client-side-validations.js b/dist/client-side-validations.js index 86a45d1e..26da952a 100644 --- a/dist/client-side-validations.js +++ b/dist/client-side-validations.js @@ -1,6 +1,6 @@ /*! * Client Side Validations JS - v0.4.0 (https://github.com/DavyJonesLocker/client_side_validations) - * Copyright (c) 2024 Geremia Taglialatela, Brian Cardarella + * Copyright (c) 2025 Geremia Taglialatela, Brian Cardarella * Licensed under MIT (https://opensource.org/licenses/mit-license.php) */ diff --git a/gemfiles/rails_6.1.gemfile b/gemfiles/rails_6.1.gemfile index de501eba..357c6d10 100644 --- a/gemfiles/rails_6.1.gemfile +++ b/gemfiles/rails_6.1.gemfile @@ -21,5 +21,6 @@ gem "sinatra" gem "sqlite3", "~> 1.7" gem "webrick" gem "rails", "~> 6.1.0" +gem "concurrent-ruby", "< 1.3.5" gemspec path: "../" diff --git a/gemfiles/rails_7.0.gemfile b/gemfiles/rails_7.0.gemfile index 1425f9a1..d0b5c0d8 100644 --- a/gemfiles/rails_7.0.gemfile +++ b/gemfiles/rails_7.0.gemfile @@ -21,5 +21,6 @@ gem "sinatra" gem "sqlite3", "~> 1.7" gem "webrick" gem "rails", "~> 7.0.0" +gem "concurrent-ruby", "< 1.3.5" gemspec path: "../" diff --git a/lib/client_side_validations/action_view/form_with_helper.rb b/lib/client_side_validations/action_view/form_with_helper.rb index fac5b343..f3e32061 100644 --- a/lib/client_side_validations/action_view/form_with_helper.rb +++ b/lib/client_side_validations/action_view/form_with_helper.rb @@ -4,7 +4,7 @@ module ClientSideValidations module ActionView module Helpers module FormHelper - def form_with(model: nil, scope: nil, url: nil, format: nil, **options, &block) + def form_with(model: false, scope: nil, url: nil, format: nil, **options, &block) return super unless options[:validate] options[:allow_method_names_outside_object] = true diff --git a/lib/client_side_validations/version.rb b/lib/client_side_validations/version.rb index f6285b82..ce9a7cc0 100644 --- a/lib/client_side_validations/version.rb +++ b/lib/client_side_validations/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module ClientSideValidations - VERSION = '22.3.0' + VERSION = '22.3.1' end diff --git a/test/action_view/cases/test_form_with_helpers.rb b/test/action_view/cases/test_form_with_helpers.rb index 9cf5a3c3..9e85396b 100644 --- a/test/action_view/cases/test_form_with_helpers.rb +++ b/test/action_view/cases/test_form_with_helpers.rb @@ -67,6 +67,14 @@ def test_form_with_automatically_generate_ids assert_dom_equal expected, output_buffer end + def test_form_with_skip_validate + assert_nothing_raised do + form_with(validate: false) + end + + assert_dom 'form' + end + BASE_FIELD_HELPERS.each do |field_helper, options| define_method(:"test_form_with_#{field_helper}") do form_with(model: @post, validate: true) do |f| diff --git a/vendor/assets/javascripts/rails.validations.js b/vendor/assets/javascripts/rails.validations.js index 86a45d1e..26da952a 100644 --- a/vendor/assets/javascripts/rails.validations.js +++ b/vendor/assets/javascripts/rails.validations.js @@ -1,6 +1,6 @@ /*! * Client Side Validations JS - v0.4.0 (https://github.com/DavyJonesLocker/client_side_validations) - * Copyright (c) 2024 Geremia Taglialatela, Brian Cardarella + * Copyright (c) 2025 Geremia Taglialatela, Brian Cardarella * Licensed under MIT (https://opensource.org/licenses/mit-license.php) */