Bugs: Browse | Submit New | Admin

[#21530] Railroad falling over on STI classes

Date:
2008-08-12 12:05
Priority:
3
Submitted By:
Tom Tuddenham (ferrisoxide)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Railroad falling over on STI classes

Detailed description
I've commented on this in another issue, but I can't see where the comment has gone. Trying to create diagrams for STI
classes causes "`load_missing_constant': uninitialized constant" errors. To add support for STI classes I
had to make this hacky change to app_diagram.rb:

  # Extract class name from filename
  def extract_class_name(filename)
    # hack to support STI
    dir_name = File.basename(File.dirname(filename)).camelize
    module_name = ['Models', 'Controllers'].include?(dir_name) ? '' : dir_name + '::'
    module_name + File.basename(filename).chomp(".rb").camelize
  end

Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-08-12 13:41
Sender: Tom Tuddenham

Looks like other people have encountered this problem - with
nested controllers
as well. There is another solution here that looks less hacky
than mine:

http://rubyforge.org/tracker/index.php?
func=detail&aid=20135&group_id=3383&atid=12998
Date: 2008-08-12 13:41
Sender: Tom Tuddenham

Looks like other people have encountered this problem - with
nested controllers
as well. There is another solution here that looks less hacky
than mine:

http://rubyforge.org/tracker/index.php?
func=detail&aid=20135&group_id=3383&atid=12998

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item