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.
0727907ae68db2e8ebc1ea1b01f00d69?d=identicon&s=25 Dan Webb (Guest)
on 2006-05-18 15: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
Db303dc84d03a992b33cd3ac978f89ae?d=identicon&s=25 Benjamin Curtis (Guest)
on 2006-05-18 16: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 Curtis
http://www.bencurtis.com/
http://www.tesly.com/ -- Collaborative test case management
http://www.agilewebdevelopment.com/ -- Resources for the Rails community
30ee518e6fdc5b07e060775b5a542bdb?d=identicon&s=25 Jón Borgþórsson (jongretar)
on 2006-05-18 16:24
(Received via mailing list)
Excellent..... I was actually thinking on how to do this earlier
today.... :)

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


--
0727907ae68db2e8ebc1ea1b01f00d69?d=identicon&s=25 Dan Webb (Guest)
on 2006-05-18 17: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
30ee518e6fdc5b07e060775b5a542bdb?d=identicon&s=25 Jón Borgþórsson (jongretar)
on 2006-05-18 17: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 Webb <dan@danwebb.net> 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.