Reputation: 4974
My current Ember router is using the hash
location and I want to switch to using history
location. I'm using Rails with thin
to serve up the app and hosting on Heroku.
How do I gracefully change the location setting so links that users have bookmarked don't suddenly start breaking?
I saw this solution to edit the .htaccess
file, but as far as I can see, Rails doesn't run on top of Apache, so this isn't a solution?
Upvotes: 0
Views: 372
Reputation: 19050
I would recommend doing this client-side. Add something like this to your app:
App = Ember.Application.create({
ready: function() {
if (location.hash) {
//map known hash values to urls, redirect as needed...
}
}
});
Upvotes: 1