Mike Garey
2006-Jul-07 16:39 UTC
[Rails] question about routes and using flash for navigation
I have a flash movie that I''m using for site navigation.. I have links such as: ''/site/signup'', ''/site/login'' and ''/site/faq'' where site is my controller and signup, login or faq are my actions.. I also have the following routes defined in routes.rb: map.connect "/", :controller => "site", :action => "index" # Install the default route as the lowest priority. map.connect '':controller/:action/:id'' this works fine when you first load the site and then click on the "Signup" button, which takes you to ''/site/signup'', but if you then click on the ''Login'' button, it tries to take you to ''/site/site/login'' which fails. I can fix this by adding a route for ''/site/site/login'' but I was wondering if there might be a better way to accomplish this. Any help is appreciated. Thanks, Mike
Mike Garey
2006-Jul-07 16:44 UTC
[Rails] Re: question about routes and using flash for navigation
er, that was stupid.. I didn''t realize all my links in flash were relative and not absolute.. Fixed by placing a ''/'' in front of all my paths.. Please ignore ;-) Mike On 7/7/06, Mike Garey <random52k@gmail.com> wrote:> I have a flash movie that I''m using for site navigation.. I have links such as: > > ''/site/signup'', ''/site/login'' and ''/site/faq'' where site is my > controller and signup, login or faq are my actions.. I also have the > following routes defined in routes.rb: > > map.connect "/", :controller => "site", :action => "index" > > # Install the default route as the lowest priority. > map.connect '':controller/:action/:id'' > > this works fine when you first load the site and then click on the > "Signup" button, which takes you to ''/site/signup'', but if you then > click on the ''Login'' button, it tries to take you to > ''/site/site/login'' which fails. I can fix this by adding a route for > ''/site/site/login'' but I was wondering if there might be a better way > to accomplish this. Any help is appreciated. Thanks, > > Mike >