Commit 87f57f5a authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera

Merge branch '321859-template-with-rails-ajax' into 'master'

Replace jquery.get with Rails.ajax

See merge request gitlab-org/gitlab!55158
parents d7fe47dd 2764ade4
import $ from 'jquery';
import { Rails } from '~/lib/utils/rails_ujs';
import projectNew from '~/projects/project_new';
const bindEvents = () => {
......@@ -125,13 +126,11 @@ export default () => {
$groupTabContent.on('ajax:success', bindEvents);
$navElement.one('click', () => {
// eslint-disable-next-line no-jquery/no-ajax
$.get($tabContent.data('initialTemplates'));
Rails.ajax({ url: $tabContent.data('initialTemplates'), type: 'GET' });
});
$groupNavElement.one('click', () => {
// eslint-disable-next-line no-jquery/no-ajax
$.get($groupTabContent.data('initialTemplates'));
Rails.ajax({ url: $groupTabContent.data('initialTemplates'), type: 'GET' });
});
bindEvents();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment