Skip to content

Commit

Permalink
[playframework#77] Save topic after increment of the views count
Browse files Browse the repository at this point in the history
  • Loading branch information
erwan committed Jun 9, 2011
1 parent d37c2d4 commit f015e1c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions samples-and-tests/forum/app/controllers/Topics.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public static void show(Long forumId, Long topicId, Integer page) {
Topic topic = Topic.findById(topicId);
notFoundIfNull(topic);
topic.views += 1;
topic.save();
render(topic, page);
}

Expand Down

0 comments on commit f015e1c

Please sign in to comment.