RubyFlow The Ruby and Rails community linklog

How to make AJAX calls in Rails 5.1

Learn how to make AJAX calls in Rails 5.1 using rails-ujs, jQuery or axios. Rails 5.1 shipped without jQuery as a dependency, replacing it with its own library rails-ujs for Unobtrusive JavaScript features. There are a few changes in the way you do AJAX calls, including things like data formats and CSRF tokens. This short article will bring you up to speed.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in