examples/blog/src/models/blog.rb in nitro-0.16.0 vs examples/blog/src/models/blog.rb in nitro-0.17.0
- old
+ new
@@ -1,9 +1,5 @@
-# * George Moschovitis <gm@navel.gr>
-# (c) 2004-2005 Navel, all rights reserved.
-# $Id: blog.rb 20 2005-04-15 15:18:36Z gmosx $
-
require 'models/content'
# Forward reference to the Comment definition.
class Comment; end
@@ -22,10 +18,10 @@
# An entry in the Blog.
class BlogEntry
include Common
- has_many :comments, Comment, :linkback => 'entry_oid'
+ has_many :comments, Comment, :foreign_name => 'entry'
validate_value :title, :msg => 'Please provide a title'
end
# A comment to the blog entry.