Fix formatting according to HoundBot

This commit is contained in:
Jure Grabnar 2018-10-12 00:48:12 +02:00
parent 1761d57b9d
commit 2558b7a313
4 changed files with 30 additions and 23 deletions

View file

@ -219,31 +219,31 @@
*/
function initExportProjectsModal() {
$exportProjectsBtn = $('#export-projects-button')
$exportProjectsBtn.click(function() {
$exportProjectsBtn.click(function() {
// Load HTML to refresh users list
$.ajax({
url: $exportProjectsBtn.data('export-projects-url'),
type: 'POST',
dataType: 'json',
data: {
project_ids: selectedProjects
},
success: function(data) {
// Update modal title
exportProjectsModalHeader.html(data.title);
// Load HTML to refresh users list
$.ajax({
url: $exportProjectsBtn.data('export-projects-url'),
type: 'POST',
dataType: 'json',
data: {
project_ids: selectedProjects
},
success: function(data) {
// Update modal title
exportProjectsModalHeader.html(data.title);
// Set modal body
exportProjectsModalBody.html(data.html);
// Set modal body
exportProjectsModalBody.html(data.html);
// Show the modal
exportProjectsModal.modal('show');
},
error: function() {
// TODO
}
});
// Show the modal
exportProjectsModal.modal('show');
},
error: function() {
// TODO
}
});
});
// Remove modal content when modal window is closed.
exportProjectsModal.on('hidden.bs.modal', function() {

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true.
module VariablesModel
extend ActiveSupport::Concern

View file

@ -1,6 +1,9 @@
class User < ApplicationRecord
include SearchableModel, SettingsModel, VariablesModel
include User::TeamRoles, User::ProjectRoles
include SearchableModel
include SettingsModel
include VariablesModel
include User::TeamRoles
include User::ProjectRoles
acts_as_token_authenticatable
devise :invitable, :confirmable, :database_authenticatable, :registerable,

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddVariablesToUsers < ActiveRecord::Migration[5.1]
def up
add_column :users, :variables, :jsonb, default: {}, null: false