DavyJonesLocker / client_side_validations

Client Side Validations made easy for Ruby on Rails
MIT License
2.69k stars 404 forks source link

Rails 7.0 issues #869

Closed tagliala closed 2 years ago

tagliala commented 2 years ago

Steps to reproduce*

  1. Create a new Rails 7 application
  2. Scaffold a model
  3. Add validate: true to form_with tag
  4. Visit new model page
  5. Profit

Expected behavior*

Works

Actual behavior*

Crashes

The problem is here:

https://github.com/DavyJonesLocker/client_side_validations/blob/8207046e4d98fa055a20a7f80101e200122fcdd1/lib/client_side_validations/action_view/form_builder.rb#L32-L33

On localhost, I cannot even add validate: true to a basic form_with and I get

undefined method `content_tag' for ActionView::Base:Class

without a backtrace

undefined method `content_tag' for ActionView::Base:Class
Did you mean?  const_get

System configuration*

Rails version: 7.0

Ruby version: 3.0.3

Client Side Validations version: 20.0.1 / main

Code snippet from your model of the validations*

The whole form code from your template*

The resulting HTML*

Browser's development console output*

Additional JavaScript Libraries*

If your issue depends on other JavaScript libraries, please list them here. E.g: Bootstrap Modal v3.3.7, jQuery UI Datepicker 1.12.4.

Repository demostrating the issue

Debugging CSV issues is a time consuming task. If you want to speed up things, please provide a link to a repository showing the issue.


* Failure to include this requirement may result in the issue being closed.

tagliala commented 2 years ago

Ref: rails/rails#42755