diff --git a/bullet_train-super_scaffolding/lib/scaffolding/file_manipulator.rb b/bullet_train-super_scaffolding/lib/scaffolding/file_manipulator.rb index b12351837..c5fe74a38 100644 --- a/bullet_train-super_scaffolding/lib/scaffolding/file_manipulator.rb +++ b/bullet_train-super_scaffolding/lib/scaffolding/file_manipulator.rb @@ -50,7 +50,7 @@ def self.add_line_to_yml_file(file, content, location_array) insert_after = 1 lines.each_with_index do |line, index| break if current_needle.nil? - if line.strip == current_needle + ":" + if line.split("#").first.strip == current_needle + ":" current_needle = location_array.shift.to_s insert_after = index current_space = line.match(/\s+/).to_s