Help with subdomain routing

0 views
Skip to first unread message

Deepak Jois

unread,
Apr 14, 2008, 8:04:50 AM4/14/08
to singap...@googlegroups.com
Hi
I need help with some advanced routing stuff which I am struggling
with a couple of days now.

The entire description is here : http://pastie.org/180432

Any clues? Tips?

Deepak

choonkeat

unread,
Apr 16, 2008, 2:45:44 AM4/16/08
to singap...@googlegroups.com
Sorry I can't help.

From my understanding, the main issue is at the usage of "link_to" since u got 2 URI schemes for the same "thing"?

I was just curious to know why the need for the complexity of the dual scheme? Is it worth it?

--
choonkeat

Deepak Jois

unread,
Apr 16, 2008, 3:46:14 AM4/16/08
to singap...@googlegroups.com
On Wed, Apr 16, 2008 at 2:45 PM, choonkeat <choo...@gmail.com> wrote:

> From my understanding, the main issue is at the usage of "link_to" since u
> got 2 URI schemes for the same "thing"?
>

After scratching my head numerous times, I have arrived at a solution
which is not too bad. The next best alternative is to hack into ruby
routing code.

I am using the request_routing plugin and doing the following :

http://pastie.caboo.se/181581

Using before_filter in the relevant controllers to find the site if
the access happens via subdomain.

The slightly tedious part is that my views become a bit complicated
(notice the host_port_hash function in the helper), because I have to
use the host and port hash with a LOT of url helpers. This is
something that I cant figure out how to optimise further.

Deepak

> I was just curious to know why the need for the complexity of the dual
> scheme? Is it worth it?
>

Well, if I was able to talk more about the app, I would tell you why
it is worth it :).

Deepak Jois

unread,
Apr 18, 2008, 7:57:00 PM4/18/08
to singap...@googlegroups.com
Hi
I found a solution close to what I myself am using, except the
explanation is clearer.

http://www.vaporbase.com/postings/Url_For_Subdomains

Deepak

Reply all
Reply to author
Forward
0 new messages