This is a migrated thread and some comments may be shown as answers.

Rails deeply nested routes creates a bug in tabstrip

1 Answer 41 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mate
Top achievements
Rank 2
Mate asked on 14 Sep 2013, 09:53 PM
I am developing a test app to try out kendo ui mobile.
The app has 3 main models which are present in the url : Organization, Shop, Category
Everything seems to be alright when I visit appdomain.com/categories or appdomain.com/organizations or even appdoman/organizations/1.
(Although the Home tabstrip button gets activated when I go to  appdoman/organizations/1 but it still takes me back to the apps homepage if I click on it. )
The problem comes when I go deeper. Like appdomain.com/organization/1/category/2/shops or appdomain.com/organization/1/category/2/shops/1
When I visit those, TabStrip thinks from that point on that they are the homepage, the root url  and messes up my whole nav structure.

What is the proper way to use rails nested routes with Kendo UI mobile so they won't effect the tabstrip nav in a negative way?

UPDATE
It seems that I had to remove the rails route helpers, and construct the urls differently.
So instead of:
<a href="<%= organizations_categories_shops_path(@category) %>">

I use:
<a href="/#/organizations/<%= @organization.id %>/categories/<%= category.id %>/shops">
You surely notice that I had to append /#/ manually at the beginning of these deeply nested urls to make it work. Still need to find out why, and where it is needed exactly.

1 Answer, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 18 Sep 2013, 08:06 AM
Hello Mate,

the behavior is by design – please look through our remote views section documentation. Loading remote views by requesting the URL directly is not supported by default. 

Regards,
Petyo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Mate
Top achievements
Rank 2
Answers by
Petyo
Telerik team
Share this question
or