Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/routes/stories/show.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default Ember.Route.extend({
},

model(params) {
return this.store.fetch('story', params.story_id);
return this.store.fetchById('story', params.story_id);
},

afterModel(story) {
Expand Down
2 changes: 1 addition & 1 deletion config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = function(environment) {
modulePrefix: 'hn-reader',
environment: environment,
baseURL: '/',
locationType: 'auto',
locationType: 'mapped',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I heard about the crash, but I am pretty sure it is not caused by this. Do you remember why you ended up with this fix?

EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"ember-cli-uglify": "1.0.1",
"ember-data": "1.0.0-beta.15",
"ember-export-application-global": "^1.0.2",
"ember-inflector": "1.3.1"
"ember-inflector": "1.3.1",
"glob": "4.0.5"
},
"ember-addon": {
"paths": [
Expand Down
22 changes: 22 additions & 0 deletions tests/unit/initializers/04-url-mapper-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Ember from 'ember';
import { initialize } from '../../../initializers/04-url-mapper';
import { module, test } from 'qunit';

var container, application;

module('04UrlMapperInitializer', {
beforeEach: function() {
Ember.run(function() {
application = Ember.Application.create();
container = application.__container__;
application.deferReadiness();
});
}
});

// Replace this with your real tests.
test('location:mapped registered on initialize', function(assert) {
initialize(container, application);

assert.equal(container.resolve('location:mapped'), '(subclass of Ember.HistoryLocation)');
});