diff --git a/app/helpers/additionals_queries_helper.rb b/app/helpers/additionals_queries_helper.rb index 0fd4732c..4c357af4 100644 --- a/app/helpers/additionals_queries_helper.rb +++ b/app/helpers/additionals_queries_helper.rb @@ -83,7 +83,7 @@ module AdditionalsQueriesHelper scope = scope.visible unless options[:all_visible] scope = scope.where.not(id: exclude_id) if exclude_id.positive? scope = scope.where(options[:where_filter], options[:where_params]) if options[:where_filter] - q.split(' ').map { |search_string| scope = scope.like(search_string) } if q.present? + q.split.map { |search_string| scope = scope.like(search_string) } if q.present? scope = scope.order(last_login_on: :desc) .limit(Additionals::SELECT2_INIT_ENTRIES) @users = scope.to_a.sort! { |x, y| x.name <=> y.name } diff --git a/app/models/dashboard.rb b/app/models/dashboard.rb index 9b1d5f47..9254e52d 100644 --- a/app/models/dashboard.rb +++ b/app/models/dashboard.rb @@ -4,6 +4,7 @@ class Dashboard < ActiveRecord::Base include Additionals::EntityMethods class SystemDefaultChangeException < StandardError; end + class ProjectSystemDefaultChangeException < StandardError; end belongs_to :project diff --git a/lib/additionals/helpers.rb b/lib/additionals/helpers.rb index 6a963ff4..59151dd8 100644 --- a/lib/additionals/helpers.rb +++ b/lib/additionals/helpers.rb @@ -212,12 +212,12 @@ module Additionals def project_list_css_classes(project, level) classes = [cycle('odd', 'even')] - classes += project.css_classes.split(' ') + classes += project.css_classes.split if level.positive? classes << 'idnt' classes << "idnt-#{level}" end - classes.join(' ') + classes.join ' ' end def addtionals_textarea_cols(text, options = {}) diff --git a/lib/additionals/wiki_macros/fa_macro.rb b/lib/additionals/wiki_macros/fa_macro.rb index aaf7835c..00637ce7 100644 --- a/lib/additionals/wiki_macros/fa_macro.rb +++ b/lib/additionals/wiki_macros/fa_macro.rb @@ -48,7 +48,7 @@ module Additionals classes << "fa-#{values[0]}" end - classes += options[:class].split(' ') if options[:class].present? + classes += options[:class].split if options[:class].present? classes << "fa-#{options[:size]}" if options[:size].present? content_options = { class: classes.uniq.join(' ') }