Ghost/core/client/routes/posts/index.js
Manuel Mitasch 49ea71ed4f Amend fixtures & put body classes in styleBody mixin
- 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.
2014-03-09 15:30:54 +00:00

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;