public static void index() { Post frontPost = Post.find("order by postedAt desc").first(); List<Post> olderPosts = Post.find("order by postedAt desc").from(1).fetch(10); render(frontPost, olderPosts); }
public static void index() { String user = Security.connected(); List<Post> posts = Post.find("author.email", user).fetch(); render(posts); }