Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue when using rake diagram:all_with_engines #85

Open
wugols2004 opened this issue Jan 12, 2015 · 3 comments
Open

issue when using rake diagram:all_with_engines #85

wugols2004 opened this issue Jan 12, 2015 · 3 comments

Comments

@wugols2004
Copy link

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.

@dpritchett
Copy link

+1, exact same issue here :)

@preston
Copy link
Owner

preston commented Apr 10, 2015

Anyone have a PR?

@craigmcdonald
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants