mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-12 16:14:25 +03:00
49ea71ed4f
- 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; |