Rails UJS documentation

Hey @Betsy_Haibel ! It looks like that Javascript thread is unfortunately inaccurately named, and the guide being drafted is exclusively for Webpacker. Here’s a comment in a PR I opened addressing the topic.

Additionally, in the comment, it was mentioned that there is another comment on a Rails PR that mentions that Rails UJS methods shouldn’t be called directly in code. This relates back to a question posed in the original post.

Given this comment in the original post, I think that this is particularly of note since there seems to be a lack of awareness of this recommendation across third-party sources. In fact, I’ve found the direct use of Rails-UJS methods to be pretty common. It may even be worth opening the discussion on whether methods should be encouraged to be used outside of the library, especially since methods like Rails.ajax() help prevent common errors that catch-up newbies, like not including the CSRF token in the header of the AJAX request (I’m no exception to this).