Support Requests: Browse | Submit New | Admin

[#22649] Support for controllers grouped in modules

Date:
2008-11-01 02:03
Priority:
3
Submitted By:
Louis-Kenzo Cahier (kenzo)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Support for controllers grouped in modules

Detailed description
It seems RailRoad doesn't handle controllers grouped in modules, as in:

 class Admin::BookController < ApplicationController
 end

RailRoad 0.5.0 breaks on such controllers, with ActiveSupport throwing:

 `load_missing_constant': uninitialized constant BookController (NameError)

This happens as constantize is called on line 28 of file controllers_diagram.rb and passed the non-grouped form
"BookController", extracted from the filename "book_controller.rb". constantize should instead be
passed "Admin::BookController".

Supporting this feature can simply be achieved by looking for sub-directories of app/controllers in the path of each
controller file; example in attached file.

Further support could include a graphical representation of these controller groups.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2009-01-20 12:03
Sender: James Tan

I'm having the same problems too. 

The controllers_diagram.rb looks good, though it might be better
to put the namespace/module prefix in the extract_class_name
method in app_diagram.rb instead.

Attached Files:

Name Description Download
controllers_diagram.rb Altered controllers_diagram.rb that handles controllers grouped in modules Download

Changes:

Field Old Value Date By
File Added4125: controllers_diagram.rb2008-11-01 02:03kenzo