Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 public static void index() {
   String user = Security.connected();
   List<Post> posts = Post.find("author.email", user).fetch();
   render(posts);
 }