mercredi 18 mars 2015

Rails change page view based on URL

On one projects#index page, I've 3 different views [Grid, Map, Stats] and each view has a button. When user clicks any view it sends a AJAX Request and load the required content for that view.By default the Grid view gets loaded.


now my client wants to directly load the view based of following URL:



http://ift.tt/194salQ
http://ift.tt/1BYuwy0
http://ift.tt/194saC6


But when i check the controller, it doesnt get the information of #grid,#stats and #maps. How we can achieve this in rails. is this possible ? He doesnt want to go with:



http://ift.tt/1BYuztS
http://ift.tt/194se4S
http://ift.tt/1BYuztU

Aucun commentaire:

Enregistrer un commentaire