mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 11:22:19 +03:00
275f623278
- Change fixture response of posts route to actual format. - Extracted classNames logic of routes into style-body mixin. - Additionally replaced all double-quotes with single-quotes for style conformance.
12 lines
319 B
JavaScript
12 lines
319 B
JavaScript
var PostsIndexRoute = Ember.Route.extend({
|
|
// redirect to first post subroute
|
|
redirect: function () {
|
|
var firstPost = (this.modelFor('posts') || []).get('firstObject');
|
|
|
|
if (firstPost) {
|
|
this.transitionTo('posts.post', firstPost);
|
|
}
|
|
}
|
|
});
|
|
|
|
export default PostsIndexRoute; |