Skip to content

Commit

Permalink
Rubocop autofixes
Browse files Browse the repository at this point in the history
  • Loading branch information
reidab committed Mar 28, 2020
1 parent 88a72b5 commit 4d2bdde
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# This migration comes from acts_as_taggable_on_engine (originally 6)
if ActiveRecord.gem_version >= Gem::Version.new('5.0')
class AddMissingIndexesOnTaggings < ActiveRecord::Migration[4.2]; end
Expand All @@ -12,12 +14,12 @@ def change
add_index :taggings, :tagger_id unless index_exists? :taggings, :tagger_id
add_index :taggings, :context unless index_exists? :taggings, :context

unless index_exists? :taggings, [:tagger_id, :tagger_type]
add_index :taggings, [:tagger_id, :tagger_type]
unless index_exists? :taggings, %i[tagger_id tagger_type]
add_index :taggings, %i[tagger_id tagger_type]
end

unless index_exists? :taggings, [:taggable_id, :taggable_type, :tagger_id, :context], name: 'taggings_idy'
add_index :taggings, [:taggable_id, :taggable_type, :tagger_id, :context], name: 'taggings_idy'
unless index_exists? :taggings, %i[taggable_id taggable_type tagger_id context], name: 'taggings_idy'
add_index :taggings, %i[taggable_id taggable_type tagger_id context], name: 'taggings_idy'
end
end
end
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
require 'timecop'
require 'webmock'

if Object.const_defined? "SimpleCov"
SimpleCov.command_name "rspec"
if Object.const_defined? 'SimpleCov'
SimpleCov.command_name 'rspec'
end

# Load support files
Expand Down

0 comments on commit 4d2bdde

Please sign in to comment.