summaryrefslogtreecommitdiff
path: root/rubocop
diff options
context:
space:
mode:
Diffstat (limited to 'rubocop')
-rw-r--r--rubocop/cop/migration/datetime.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/rubocop/cop/migration/datetime.rb b/rubocop/cop/migration/datetime.rb
index 03ad3f3f601..5a6cdc74ca4 100644
--- a/rubocop/cop/migration/datetime.rb
+++ b/rubocop/cop/migration/datetime.rb
@@ -14,7 +14,7 @@ module RuboCop
return unless in_migration?(node)
node.each_descendant(:send) do |send_node|
- method_name = node.children[1]
+ method_name = send_node.children[1]
if method_name == :datetime || method_name == :timestamp
add_offense(send_node, location: :selector, message: format(MSG, method_name))