Hey :)
I''m trying to create a method for making a sitemap dynamically. It
works great for flat sites where you simply have your controllers in
the app/controllers directory. In this case, I can extract the
controller names like,
@controllers
ObjectSpace.subclasses_of(ActionController::Base).each do |obj|
@controllers["#{obj.controller_name}"] = obj
end
However, now I''ve divided the site into modules, that is, I have for
instance both Store::ItemsController and Manage::ItemsController,
which reside in app/controllers/store and app/controllers/manage
respectively.
This causes my code above to basically (as it seems) discard the
"duplicate" controllers when traversing the classes. What I''d
like to
do is mimic the hierarchy in my module::controller::action structure,
but I don''t know how to do that...
I''d like to have a three dimensional array like, [module_name]
[controller_name][action_name]
Help?
Thanks :)
Daniel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---