aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/info_request.rb
diff options
context:
space:
mode:
authorfrancis <francis>2008-10-02 23:11:39 +0000
committerfrancis <francis>2008-10-02 23:11:39 +0000
commit4f02cb989cd3eb0f01bd6dad1d13400f57c1e745 (patch)
tree166b72fd8ae0db426de8ae933483a405876427af /app/models/info_request.rb
parent1bf93279a8f9c3ac33b210a8d17a4a350ffa6c93 (diff)
Option to hide comments.
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r--app/models/info_request.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index 43d566199..e9f76f445 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -23,7 +23,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: info_request.rb,v 1.143 2008-09-23 00:47:50 francis Exp $
+# $Id: info_request.rb,v 1.144 2008-10-02 23:11:40 francis Exp $
require 'digest/sha1'
require File.join(File.dirname(__FILE__),'../../vendor/plugins/acts_as_xapian/lib/acts_as_xapian')
@@ -76,6 +76,10 @@ class InfoRequest < ActiveRecord::Base
end
end
+ def visible_comments
+ self.comments.find(:all, :conditions => 'visible')
+ end
+
# Central function to do all searches
# (Not really the right place to put it, but everything can get it here, and it
# does *mainly* find info requests, via their events, so hey)