diff options
Diffstat (limited to 'rubocop/cop/migration/prevent_index_creation.rb')
-rw-r--r-- | rubocop/cop/migration/prevent_index_creation.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rubocop/cop/migration/prevent_index_creation.rb b/rubocop/cop/migration/prevent_index_creation.rb index c383466f73b..185f36cb24b 100644 --- a/rubocop/cop/migration/prevent_index_creation.rb +++ b/rubocop/cop/migration/prevent_index_creation.rb @@ -5,7 +5,7 @@ module RuboCop module Cop module Migration # Cop that checks if new indexes are introduced to forbidden tables. - class PreventIndexCreation < RuboCop::Cop::Cop + class PreventIndexCreation < RuboCop::Cop::Base include MigrationHelpers FORBIDDEN_TABLES = %i[ci_builds].freeze @@ -41,7 +41,7 @@ module RuboCop return unless in_migration?(node) node.each_descendant(:send) do |send_node| - add_offense(send_node, location: :selector) if offense?(send_node) + add_offense(send_node.loc.selector) if offense?(send_node) end end |