Skip to content

Commit eb05305

Browse files
committed
fix: Correctly resolve path to versioned model
1 parent 108a862 commit eb05305

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/generators/logidze/model/model_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def inject_logidze_to_model
6565
indents = " " * (class_name.scan("::").count + 1)
6666
macros_name = detached? ? "has_logidze detached: true\n" : "has_logidze\n"
6767

68-
if File.readlines(model_file_path).grep(/has_logidze/).empty?
68+
if File.readlines("#{destination_root}/#{model_file_path}").grep(/has_logidze/).empty?
6969
inject_into_class(model_file_path, class_name.demodulize, indents + macros_name)
7070
end
7171
end

0 commit comments

Comments
 (0)