Skip to content

remove deprec rails-ujs #2005

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yshmarov
Copy link

# old
- link_to "Delete", product_path(product), method: :delete
# new
+ link_to "Delete", product_path(product), turbo_method: :delete 
# best
button_to "Delete", product_path(product), method: :delete 

@@ -3,7 +3,6 @@
// includes should be specified at the end of the file, not in this section. This helps avoid merge conflicts in the
// future should the framework defaults change.

import Rails from "@rails/ujs"
Copy link
Contributor

Choose a reason for hiding this comment

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

@yshmarov I think that removing this line would cause the Rails.start() call below (on line 12/11) to fail. Do you need to also remove that?

Copy link
Author

Choose a reason for hiding this comment

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

If we are removing rails/ujs from package.json, we won't have a place to "import Rails" from

I can have a look at how/whether Rails.start() needs to be updated

@jagthedrummer
Copy link
Contributor

Also this has broken a lot of tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants