From 2558b7a313472852811b73b304acaa3658d5239d Mon Sep 17 00:00:00 2001 From: Jure Grabnar Date: Fri, 12 Oct 2018 00:48:12 +0200 Subject: [PATCH] Fix formatting according to HoundBot --- app/assets/javascripts/projects/index.js | 42 +++++++++---------- app/models/concerns/variables_model.rb | 2 + app/models/user.rb | 7 +++- .../20180930205254_add_variables_to_users.rb | 2 + 4 files changed, 30 insertions(+), 23 deletions(-) diff --git a/app/assets/javascripts/projects/index.js b/app/assets/javascripts/projects/index.js index c7c76f486..9defd81df 100644 --- a/app/assets/javascripts/projects/index.js +++ b/app/assets/javascripts/projects/index.js @@ -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() { diff --git a/app/models/concerns/variables_model.rb b/app/models/concerns/variables_model.rb index 637161b8e..8250c5852 100644 --- a/app/models/concerns/variables_model.rb +++ b/app/models/concerns/variables_model.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true. + module VariablesModel extend ActiveSupport::Concern diff --git a/app/models/user.rb b/app/models/user.rb index 96cc4dc5e..3db082f19 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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, diff --git a/db/migrate/20180930205254_add_variables_to_users.rb b/db/migrate/20180930205254_add_variables_to_users.rb index 9b40123fa..812f5a7e2 100644 --- a/db/migrate/20180930205254_add_variables_to_users.rb +++ b/db/migrate/20180930205254_add_variables_to_users.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddVariablesToUsers < ActiveRecord::Migration[5.1] def up add_column :users, :variables, :jsonb, default: {}, null: false