Skip to content

Commit

Permalink
Switch from jquery_ujs to rails-ujs
Browse files Browse the repository at this point in the history
rails-ujs has been available in Rails itself since 5.1.0:
https://github.com/rails/rails/tree/main/actionview/app/assets/javascripts

It obsoletes jquery_ujs. From the docs:
https://github.com/rails/jquery-rails

> If you are running Rails 5.1 and up, and if you have included //=
> require rails-ujs, then jquery_ujs is not needed anymore. You can just
> add:

    //= require jquery

This is a step towards reducing jQuery usage while still allowing for
UJS features.

Refs #2893
  • Loading branch information
jdufresne committed Sep 17, 2021
1 parent 68b0406 commit 9bb8b19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/rails_admin/rails_admin.js
@@ -1,6 +1,6 @@
//= require 'jquery3'
//= require 'rails_admin/jquery.migrate'
//= require 'jquery_ujs'
//= require 'rails-ujs'
//= require 'jquery.remotipart'
//= require 'rails_admin/jquery-ui'
//= require 'rails_admin/moment-with-locales'
Expand Down
2 changes: 1 addition & 1 deletion rails_admin.gemspec
Expand Up @@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'kaminari', '>= 0.14', '< 2.0'
spec.add_dependency 'nested_form', '~> 0.3'
spec.add_dependency 'rack-pjax', '>= 0.7'
spec.add_dependency 'rails', ['>= 5.0', '< 7']
spec.add_dependency 'rails', ['>= 5.1.0', '< 7']
spec.add_dependency 'remotipart', '~> 1.3'
spec.add_dependency 'sassc-rails', ['>= 1.3', '< 3']
spec.add_dependency 'activemodel-serializers-xml', '>= 1.0'
Expand Down

0 comments on commit 9bb8b19

Please sign in to comment.