preston / railroady

Ruby on Rails 3/4/5 model and controller UML class diagram generator. (`brew/port/apt-get install graphviz` before use!)
Other
1.72k stars 142 forks source link

uninitialized constant exception with namespaced models #86

Open xylolink opened 9 years ago

xylolink commented 9 years ago

Hi all !

I use namespaces in my application. My models are like this : School::Teacher in models/school/teacher.rb School::Student in models/school/student.rb School::Lesson in models/school/lesson.rb

When I try to generate diagrams, it raises the following exceptions for each model

Warning: exception uninitialized constant Student raised while trying to load model class app/models/school/student.rb

I think it's linked to this pull request : https://github.com/singlebrook/railroady/pull/1

Is there a way to tell railroady to consider the parent folder name as a prefix to my models ?

Thanks!

preston commented 9 years ago

Hmm ... I thought someone added namespace/module names a while back. Want to submit a PR?