Okay, so I''m working on a project and I''m using the 
shared-controller/views method described here 
(http://dereksivers.com/rails-shared-controller.html).  I''m taking a 
RESTful approach with this project, so I''d like to use the named routes
that are generated for each resource (i.e. ''news_path'',
''events_path'',
etc.).  Problem is, my shared views need to know the name of the 
controller that I''m working in so I can generate these named routes in 
my link_to and form tags.
I know that in the template that the scaffold generator creates it 
accesses the current action''s name using controller.action_name...is it
possible to do the same for a controller?  controller.class returns the 
classified name (i.e. ''NewsController''), but I need the
"file name"
(i.e. ''news'').  I''ve tried a ton of possibilities,
and I can''t find
anything in the documentation that might help me.
Any help is appreciated!
Andrew
-- 
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---