Hide diary entries and comments made by deleted users.
This commit is contained in:
parent
b13278c815
commit
6a5749c55c
2 changed files with 8 additions and 3 deletions
|
@ -1,6 +1,8 @@
|
|||
class DiaryEntry < ActiveRecord::Base
|
||||
belongs_to :user
|
||||
has_many :diary_comments, :order => "id"
|
||||
has_many :diary_comments, :include => :user,
|
||||
:conditions => "users.visible = 1",
|
||||
:order => "id"
|
||||
|
||||
validates_presence_of :title, :body
|
||||
validates_numericality_of :latitude, :allow_nil => true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue