shakacode / react_on_rails

Integration of React + Webpack + Rails + rails/webpacker including server-side rendering of React, enabling a better developer experience and faster client performance.
https://www.shakacode.com/react-on-rails/docs/
MIT License
5.12k stars 631 forks source link

Remove JsonOutput.escape workaround for Rails < 4.1.1 #1580

Closed wwahammy closed 1 year ago

wwahammy commented 1 year ago

Summary

I noticed that JsonOutput.escape had a workaround for Rails < 4.1.1. Since the minimum supported Rails version for the gem is greater than that, it doesn't seem like this needs to be there.

Addititionally, I removed the Utils.rails_version_less_than_4_1_1 method since that was the only place it was used

Pull Request checklist

Other Information

N/A


This change is Reviewable

justin808 commented 1 year ago

@wwahammy Nice catch. How did you find this?

wwahammy commented 1 year ago

@wwahammy Nice catch. How did you find this?

I was curious how the JSON output code worked because I needed something like it for a non-React on Rails project. I just noticed it when I got there.

Judahmeek commented 1 year ago

@wwahammy thank you for your contribution.