leastbad / optimism

The missing drop-in solution for realtime remote form validation in Rails.
MIT License
361 stars 42 forks source link

handle rails 6.1 and SR 3.4 #27

Closed joshleblanc closed 3 years ago

joshleblanc commented 3 years ago

This is kind of hamfisted, but these are the changes I made to get optimism working on rails 6.1 with SR 3.4.0-pre9.

leastbad commented 3 years ago

wiggle

leastbad commented 3 years ago

Josh, this is amazing. I had no idea that you were even thinking of tackling this. It's like an early xmas present.

  1. I think the config file change requires a major version bump, no?
  2. Does this still work with Rails <6.1?
  3. I thought that 6.1 completely changed the errors interface. Did I imagine this?

Seriously though... THANK YOU!

joshleblanc commented 3 years ago

It does require a major version bump due to the change of channel -> channel_proc.

There's no changes that are incompatible with rails <6.1, but I didn't test it on earlier versions.

I believe 6.1 changes the errors interface, but in a compatible way? Didn't look into it, just pulled everything in my project and fixed all the bugs that came up. The errors interface never came up.