diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 184336f6d2..0865dd43eb 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -419,18 +419,6 @@ Style/GlobalVars: Style/GuardClause: Enabled: false -# Offense count: 11 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. -# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys -Style/HashSyntax: - Exclude: - - 'app/controllers/application_controller.rb' - - 'app/helpers/accounts_helper.rb' - - 'app/helpers/application_helper.rb' - - 'app/helpers/opportunities_helper.rb' - - 'lib/fat_free_crm/engine.rb' - # Offense count: 2 Style/IdenticalConditionalBranches: Exclude: diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index de22790c9b..0600b502b7 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -272,7 +272,7 @@ def cors_preflight_check headers['Access-Control-Allow-Headers'] = 'X-Requested-With, X-Prototype-Version, Token' headers['Access-Control-Max-Age'] = '1728000' - render :text => '', :content_type => 'text/plain' + render text: '', content_type: 'text/plain' end end end diff --git a/app/helpers/accounts_helper.rb b/app/helpers/accounts_helper.rb index 619cfb53fc..648fdb17f2 100755 --- a/app/helpers/accounts_helper.rb +++ b/app/helpers/accounts_helper.rb @@ -28,8 +28,8 @@ def account_select(options = {}) options[:selected] = (@account && @account.id) || 0 accounts = ([@account] + Account.my.order(:name).limit(25)).compact.uniq collection_select :account, :id, accounts, :id, :name, options, - :"data-placeholder" => t(:select_an_account), - :"data-url" => auto_complete_accounts_path(format: 'json'), + "data-placeholder": t(:select_an_account), + "data-url": auto_complete_accounts_path(format: 'json'), style: "width:330px; display:none;", class: 'ajax_chosen' end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 41022f18ea..f4c338cb4a 100755 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -260,7 +260,7 @@ def web_presence_icons(person) else url = "http://" << url unless url.match(/^https?:\/\//) end - link_to(image_tag("#{site}.gif", size: "15x15"), h(url), :"data-popup" => true, title: t(:open_in_window, h(url))) + link_to(image_tag("#{site}.gif", size: "15x15"), h(url), "data-popup": true, title: t(:open_in_window, h(url))) end end.compact.join("\n").html_safe end @@ -482,7 +482,7 @@ def view_buttons end lis << content_tag(:li) do url = (action == "index") ? send("redraw_#{controller}_path") : send("#{controller.singularize}_path") - link_to('#', title: t(view.name, default: h(view.title)), :"data-view" => h(view.name), :"data-url" => h(url), :"data-context" => action, class: classes) do + link_to('#', title: t(view.name, default: h(view.title)), "data-view": h(view.name), "data-url": h(url), "data-context": action, class: classes) do icon = view.icon || 'fa-bars' content_tag(:i, nil, class: "fa #{h icon}") end diff --git a/app/helpers/opportunities_helper.rb b/app/helpers/opportunities_helper.rb index 91a4175e4d..9b2b733f8b 100644 --- a/app/helpers/opportunities_helper.rb +++ b/app/helpers/opportunities_helper.rb @@ -38,8 +38,8 @@ def opportunity_campaign_select(options = {}) selected_campaign = Campaign.find_by_id(options[:selected]) campaigns = ([selected_campaign] + Campaign.my.order(:name).limit(25)).compact.uniq collection_select :opportunity, :campaign_id, campaigns, :id, :name, options, - :"data-placeholder" => t(:select_a_campaign), - :"data-url" => auto_complete_campaigns_path(format: 'json'), + "data-placeholder": t(:select_a_campaign), + "data-url": auto_complete_campaigns_path(format: 'json'), style: "width:330px; display:none;", class: 'ajax_chosen' end diff --git a/lib/fat_free_crm/engine.rb b/lib/fat_free_crm/engine.rb index 31d64a4e41..f71d8a4940 100644 --- a/lib/fat_free_crm/engine.rb +++ b/lib/fat_free_crm/engine.rb @@ -11,7 +11,7 @@ class Engine < ::Rails::Engine config.active_record.observers = [:lead_observer, :opportunity_observer, :task_observer, :entity_observer] - initializer "model_core.factories", :after => "factory_girl.set_factory_paths" do + initializer "model_core.factories", after: "factory_girl.set_factory_paths" do FactoryGirl.definition_file_paths << File.expand_path('../../../spec/factories', __FILE__) if defined?(FactoryGirl) end