We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 108a862 commit eb05305Copy full SHA for eb05305
lib/generators/logidze/model/model_generator.rb
@@ -65,7 +65,7 @@ def inject_logidze_to_model
65
indents = " " * (class_name.scan("::").count + 1)
66
macros_name = detached? ? "has_logidze detached: true\n" : "has_logidze\n"
67
68
- if File.readlines(model_file_path).grep(/has_logidze/).empty?
+ if File.readlines("#{destination_root}/#{model_file_path}").grep(/has_logidze/).empty?
69
inject_into_class(model_file_path, class_name.demodulize, indents + macros_name)
70
end
71
0 commit comments