[Facebooker-talk] mapping callback url to the correct controller

Josh Sharpe josh.m.sharpe at gmail.com
Tue Dec 2 12:43:36 EST 2008


First off, our default route is:
map.connect ':locale/:controller/:action/:id'

So I created a facebook controller which can be accessed at /en/facebook/
and I set up the callbackURL to be http://www.domain.com/en/facebook.

This works and pulls up my index page just fine.  But when I create a really
simple link on that page:

<%= link_to "Something Else", :action => :something %>

It links to: /en/facebook/en/facebook/something and I obviously get a
Routing error.

So I tried to set up some routes.rb trickery:

map.connect "/en/facebook/:locale/:controller/:action/:id"
map.connect "/en/facebook/:locale/:controller/:action"

This makes links point to:
/en/facebook/en/facebook/en/facebook/something

So there is some kind of circular action going on here.

Any suggestions on how I can get out of this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20081202/48a74989/attachment.html>


More information about the Facebooker-talk mailing list