diff --git a/core/client/app/routes/editor/edit.js b/core/client/app/routes/editor/edit.js index 0ac204cb82..4062cf9a8f 100644 --- a/core/client/app/routes/editor/edit.js +++ b/core/client/app/routes/editor/edit.js @@ -8,7 +8,6 @@ var EditorEditRoute = AuthenticatedRoute.extend(base, { model: function (params) { var self = this, - post, postId, query; @@ -18,11 +17,6 @@ var EditorEditRoute = AuthenticatedRoute.extend(base, { return this.transitionTo('error404', 'editor/' + params.post_id); } - post = this.store.getById('post', postId); - if (post) { - return post; - } - query = { id: postId, status: 'all', diff --git a/core/client/app/routes/posts/post.js b/core/client/app/routes/posts/post.js index 92657a6641..c140386b31 100644 --- a/core/client/app/routes/posts/post.js +++ b/core/client/app/routes/posts/post.js @@ -61,7 +61,7 @@ var PostsPostRoute = AuthenticatedRoute.extend(ShortcutsRoute, { actions: { openEditor: function () { - this.transitionTo('editor.edit', this.get('controller.model')); + this.transitionTo('editor.edit', this.get('controller.model.id')); }, deletePost: function () { diff --git a/core/client/app/templates/posts.hbs b/core/client/app/templates/posts.hbs index ab1c344b50..8cfd16a2c2 100644 --- a/core/client/app/templates/posts.hbs +++ b/core/client/app/templates/posts.hbs @@ -11,7 +11,7 @@ {{#view "paginated-scroll-box" tagName="section" classNames="content-list-content js-content-scrollbox"}}
    {{#each controller itemController="posts/post" itemView="post-item-view" itemTagName="li" as |post|}} - {{#link-to "posts.post" post.model class="permalink" alternateActive=view.active title="Edit this post"}} + {{#link-to "posts.post" post.model.id class="permalink" alternateActive=view.active title="Edit this post"}}

    {{post.model.title}}

    diff --git a/core/client/app/templates/posts/post.hbs b/core/client/app/templates/posts/post.hbs index 30768e9da2..adfd33a4ef 100644 --- a/core/client/app/templates/posts/post.hbs +++ b/core/client/app/templates/posts/post.hbs @@ -1,10 +1,10 @@
    - {{#link-to "editor.edit" model class="btn btn-minor post-edit"}}{{/link-to}} + {{#link-to "editor.edit" model.id class="btn btn-minor post-edit"}}{{/link-to}}
    {{#view "content-preview-content-view" tagName="section"}}
    -

    {{#link-to "editor.edit" model}}{{model.title}}{{/link-to}}

    +

    {{#link-to "editor.edit" model.id}}{{model.title}}{{/link-to}}

    {{gh-format-html model.html}}
    {{/view}}