Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rails-ujs import syntax causing thumbs up/down buttons to not work #694

Merged
merged 2 commits into from
May 16, 2024

Conversation

mmx900
Copy link
Contributor

@mmx900 mmx900 commented May 15, 2024

Context

  • Currently there is __webpack_require__(...).start is not a function error in the JavaScript console. This error seems to have appeared after a recent upgrade to Rails 7. If I downgrade rails-ujs to 6.x, the error disappears. Additionally, it seems to break some functionallity that uses rails-ujs. This PR fixes the error and adds tests to prevent regression, as there were no existing tests for this functionality.

Summary of Changes

Checklist

  • Tested Mobile Responsiveness
  • Added Unit Tests
  • CI Passes
  • Deploys to Heroku on test Correctly (Maintainers will handle)
  • Added Documentation (Service and Code when required)

Screenshots

Before

After

Copy link
Contributor

@DeeDeeG DeeDeeG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

The syntax of the new import statement does indeed match the linked docs for rails-ujs.

New tests are much appreciated!

Tests (including new ones) are passing in CI. Looks good.

Thank you!

Merging this now.

@DeeDeeG DeeDeeG merged commit efeea19 into RefugeRestrooms:develop May 16, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants