Forum: Ruby on Rails virtual controller

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
1bac2e65d64faf472cf2ebc94f0f5ee0?d=identicon&s=25 ara.t.howard (Guest)
on 2007-07-06 18:19
(Received via mailing list)
anyone have thoughts on how a library could mount an action to a
route *without* messing with routes.rb or generating an actual
controller?

something along the lines of

   class ActionController::Base
     def global() render :text => '42' end
   end

   ActionController::Routing::Routes.add_route '/global', ...

??

in otherwords have a library mount an action to a route without
generating code or editing files.

cheers.

-a
--
we can deny everything, except that we have the possibility of being
better. simply reflect on that.
h.h. the 14th dalai lama
This topic is locked and can not be replied to.