Forum: Ruby on Rails [ANN] Request Routing Plugin ( :requirements => { :subdomain

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.
Dan W. (Guest)
on 2006-05-18 17:43
(Received via mailing list)
Hi All,

Just a quick note to say that I've released an intial version of the
request routing plugin which essentially allows you to use various
request object properties as requirements in routes.  Most notably you
can do:

map.connect "thing", :controller => 'main', :requirements => {
:subdomain => 'whatever' }

..just like the wiki claims you can do but you can't :)

It exposes several other request methods as well like domain, port,
method etc. and excepts Regexps as well as strings for matching.

SVN: http://svn.vivabit.net/external/rubylibs/request_routing/
README: http://svn.vivabit.net/external/rubylibs/request_r...

Cheers,

Dan
Benjamin C. (Guest)
on 2006-05-18 18:21
(Received via mailing list)
Thanks for this!  I've been wanting something like this for a while.

Published at http://agilewebdevelopment.com/plugins/request_routing :)

--
Benjamin C.
http://www.bencurtis.com/
http://www.tesly.com/ -- Collaborative test case management
http://www.agilewebdevelopment.com/ -- Resources for the Rails community
Jón B. (Guest)
on 2006-05-18 18:24
(Received via mailing list)
Excellent..... I was actually thinking on how to do this earlier
today.... :)

On 5/18/06, Dan W. <removed_email_address@domain.invalid> wrote:
> ..just like the wiki claims you can do but you can't :)
>
> --
> Dan W.
> http://www.danwebb.net
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Dan W. (Guest)
on 2006-05-18 19:36
(Received via mailing list)
Let me know if you have any problems.  The rails routing code is a
dark art.  I'm using it in a large project and it's working well and
it passes all my tests so it's looking good but any feedback would be
great.

Thanks for putting it up on agilewebdev, Ben.  I forgot about that.

Cheers,

Dan
Jón B. (Guest)
on 2006-05-18 19:43
(Received via mailing list)
I was just wondering about one thing here since you are such a routing
expert. Can I use this in some way or how is the best way to display
controller based on subdomain.
i.e.
Rendering http://UserName.mydomain.com/ as
/UserController/ShowAction/UserName


On 5/18/06, Dan W. <removed_email_address@domain.invalid> wrote:
>
> > >
> > >
> > > http://lists.rubyonrails.org/mailman/listinfo/rails
> > http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
This topic is locked and can not be replied to.