railroady
railroady copied to clipboard
issue when using rake diagram:all_with_engines
Currently tinkering railroady with spreecommerce and im getting a lot of uninitialized constant errors when generating the model using the all engines option. The model graph is blank but the controllers are generated with no problems.
+1, exact same issue here :)
Anyone have a PR?
This would seem to be somewhat spree specific, in that the method:
def get_engine_files
engines.collect { |engine| Dir.glob("#{engine.root.to_s}/app/models/**/*.rb")}.flatten
end
Is not going to load the models correctly, since the spree gem is actually bunch of related gems, like spree-core, etc.
This means that the path for each models dir, is something like:
"#{engine.root.to_s}/**/app/models/**/*.rb"
I quickly threw this in to the railroady gem and it successfully generated a model diagram with less errors, although I'm posting this here more as a signpost than any sort of real solution at present.