Add support for logical deletion of diary entries and comments.
[rails.git] / app / models / diary_entry.rb
index 705438213628fe9fbb001cc608f7500968280ed4..c6f4eaa12f1e2a38b991122082abe76ed08b7353 100644 (file)
@@ -3,7 +3,10 @@ class DiaryEntry < ActiveRecord::Base
   belongs_to :language, :foreign_key => 'language_code'
   
   has_many :diary_comments, :include => :user,
-                            :conditions => ["users.visible = ?", true],
+                            :conditions => {
+                              :users => { :visible => true },
+                              :visible => true
+                            },
                             :order => "diary_comments.id"
 
   validates_presence_of :title, :body