0

How can I create a route of this format (in Ruby on Rails routes.rb file):

/#action/id

Specifically with the "#" character inserted before the action controller...for example, see http://lala.com/#album/some-album-id

thanks!

Josh Lee
  • 171,072
  • 38
  • 269
  • 275
hagope
  • 5,523
  • 7
  • 38
  • 52
  • 1
    Just curious, what do you hope to achieve with changing the url? I cannot think of a reason for it. – Salil Apr 10 '10 at 04:04

1 Answers1

4

The actual URL you are visiting there is http://lala.com/. The server does not see the #album/some-album-id piece, the fragment identifier. That is seen solely by the browser.

There is a growing trend of building MVC apps with the views and controllers in the client/browser, rather than on the server. The application is implemented with JavaScript in the client, instead of with Ruby on the server. The server essentially becomes the API or the data-access layer, rather than being the piece that renders HTML.

yfeldblum
  • 65,165
  • 12
  • 129
  • 169