# Plugin

**URL:** <https://www.ruby-forum.com/t/plugin/90565>\
**Category:** Rails\
**Created:** [March 29, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/plugin/90565 "2007-03-29T23:05:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![leonb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/22d042/32.png) [@leonb](https://www.ruby-forum.com/u/leonb)\
**Post date:** [March 29, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/plugin/90565/1 "2007-03-29T23:05:06Z")

</div>

Hi,

I have this code in a plugin:

module ActionController  
module Routing  
def default\_controller

ActionController::Routing::Routes.routes[0].requirements[:controller]  
end  
def default\_action  
ActionController::Routing::Routes.routes[0].requirements[:action]  
end  
end  
end

And I expected that default\_controller and default\_action would be  
available everywhere. But they aren’t!

How can I make them available elsewhere? Now I would like to use them  
in another plugin.

Thanks!
