@@ -286,29 +286,29 @@ def annotate(klass, file, header, options={})
286286 table_name = klass . table_name
287287 model_file_name = File . join ( model_dir , file )
288288
289- if annotate_one_file ( model_file_name , info , options_with_position ( options , :position_in_class ) )
289+ if annotate_one_file ( model_file_name , info , :position_in_class , options_with_position ( options , :position_in_class ) )
290290 did_annotate = true
291291 end
292292
293293 unless options [ :exclude_tests ]
294294 did_annotate = TEST_PATTERNS .
295295 map { |pat | [ pat [ 0 ] , resolve_filename ( pat [ 1 ] , model_name , table_name ) ] } .
296296 map { |pat | find_test_file ( *pat ) } .
297- map { |file | annotate_one_file ( file , info , options_with_position ( options , :position_in_test ) ) } .
297+ map { |file | annotate_one_file ( file , info , :position_in_test , options_with_position ( options , :position_in_test ) ) } .
298298 detect { |result | result } || did_annotate
299299 end
300300
301301 unless options [ :exclude_fixtures ]
302302 did_annotate = FIXTURE_PATTERNS .
303303 map { |file | resolve_filename ( file , model_name , table_name ) } .
304- map { |file | annotate_one_file ( file , info , options_with_position ( options , :position_in_fixture ) ) } .
304+ map { |file | annotate_one_file ( file , info , :position_in_fixture , options_with_position ( options , :position_in_fixture ) ) } .
305305 detect { |result | result } || did_annotate
306306 end
307307
308308 unless options [ :exclude_factories ]
309309 did_annotate = FACTORY_PATTERNS .
310310 map { |file | resolve_filename ( file , model_name , table_name ) } .
311- map { |file | annotate_one_file ( file , info , options_with_position ( options , :position_in_factory ) ) } .
311+ map { |file | annotate_one_file ( file , info , :position_in_factory , options_with_position ( options , :position_in_factory ) ) } .
312312 detect { |result | result } || did_annotate
313313 end
314314
0 commit comments