4
我創建了一個新的遷移,它看起來像這樣的:修復`缺少冷凍字符串字面comment`問題
class AddCommentsToUsers < ActiveRecord::Migration
def change
add_column :users, :comments, :text
end
end
與代碼氣候
現在我警告過一個問題: Missing frozen string literal comment.
我試着修復它像這樣:
# frozen_string_literal: true
class AddCommentsToUsers < ActiveRecord::Migration
def change
add_column :users, :comments, :text
end
end
但我仍然有同樣的問題。我該如何解決它?謝謝。
看起來正確的給我。您是否使用Code Climate CLI或rubocop在當地進行過調查? –