I tryied everything: :controller => ''MyModule::Core::Controller'' require ''MyModule/core/controller'' include MyModule::Core But nothing works !!! Question is very simple: How to call a controller that belongs to a Module inside the router.rb file? This cannot be that difficult! Thanks! -Sergio -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20080218/745a9497/attachment.html
:controller => /my_module/core/controller'' Cheers- -Ezra On Feb 18, 2008, at 1:54 PM, Sergio Oliveira wrote:> > I tryied everything: > > :controller => ''MyModule::Core::Controller'' > > require ''MyModule/core/controller'' > > include MyModule::Core > > But nothing works !!! > > Question is very simple: > > How to call a controller that belongs to a Module inside the > router.rb file? > > This cannot be that difficult! > > Thanks! > > -Sergio > > > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel- Ezra Zygmuntowicz -- Founder & Software Architect -- ezra at engineyard.com -- EngineYard.com
That did not work, Ezra! Being very objective: I am building a web framework to run inside Merb, so I want the main controller to be the framework controller. module Menta module Core class Controller < Application def sayHello @hi = "Hello there!" render :layout => :none end end end end This is inside lib/Menta/core/controller.rb Inside route.rb I tried everything: :controller => ''Menta::Core:Controller'' :controller => ''menta/core/controller'' :controller => ''menta/core/Controller'' include Menta::Core Nothing will work, please advice! Thank you very much! -Sergio On Feb 18, 2008 7:00 PM, Ezra Zygmuntowicz <ez at engineyard.com> wrote:> > :controller => /my_module/core/controller'' > > Cheers- > -Ezra > > > > On Feb 18, 2008, at 1:54 PM, Sergio Oliveira wrote: > > > > > I tryied everything: > > > > :controller => ''MyModule::Core::Controller'' > > > > require ''MyModule/core/controller'' > > > > include MyModule::Core > > > > But nothing works !!! > > > > Question is very simple: > > > > How to call a controller that belongs to a Module inside the > > router.rb file? > > > > This cannot be that difficult! > > > > Thanks! > > > > -Sergio > > > > > > _______________________________________________ > > Merb-devel mailing list > > Merb-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/merb-devel > > - Ezra Zygmuntowicz > -- Founder & Software Architect > -- ezra at engineyard.com > -- EngineYard.com > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20080218/14ea2882/attachment.html
Sorry, it actually works like: r.match(/\.mtw/).to(:controller => ''menta/core/Controller'', :action =>''service'') Thanks and sorry for anything! -Sergio On Feb 18, 2008 8:59 PM, Sergio Oliveira <sergio.soujava at gmail.com> wrote:> That did not work, Ezra! > > Being very objective: I am building a web framework to run inside Merb, so > I want the main controller to be the framework controller. > > module Menta > module Core > > class Controller < Application > > def sayHello > @hi = "Hello there!" > render :layout => :none > end > end > > end > end > > This is inside lib/Menta/core/controller.rb > > Inside route.rb I tried everything: > > :controller => ''Menta::Core:Controller'' > > :controller => ''menta/core/controller'' > > :controller => ''menta/core/Controller'' > > include Menta::Core > > Nothing will work, please advice! > > Thank you very much! > > -Sergio > > > > On Feb 18, 2008 7:00 PM, Ezra Zygmuntowicz <ez at engineyard.com> wrote: > > > > > :controller => /my_module/core/controller'' > > > > Cheers- > > -Ezra > > > > > > > > On Feb 18, 2008, at 1:54 PM, Sergio Oliveira wrote: > > > > > > > > I tryied everything: > > > > > > :controller => ''MyModule::Core::Controller'' > > > > > > require ''MyModule/core/controller'' > > > > > > include MyModule::Core > > > > > > But nothing works !!! > > > > > > Question is very simple: > > > > > > How to call a controller that belongs to a Module inside the > > > router.rb file? > > > > > > This cannot be that difficult! > > > > > > Thanks! > > > > > > -Sergio > > > > > > > > > _______________________________________________ > > > Merb-devel mailing list > > > Merb-devel at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/merb-devel > > > > - Ezra Zygmuntowicz > > -- Founder & Software Architect > > -- ezra at engineyard.com > > -- EngineYard.com > > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20080218/df471f19/attachment-0001.html