diff options
author | francis <francis> | 2008-03-31 17:20:54 +0000 |
---|---|---|
committer | francis <francis> | 2008-03-31 17:20:54 +0000 |
commit | 15dc1f17ba6d2e08e38aff1a4293574247d62759 (patch) | |
tree | b2481fdf99e976379c11928d476560b82c66485b /app/models/user.rb | |
parent | 27b2f607449fabf4523a93e480d97ef446360c5d (diff) |
Search index by events, rather than by requests/messages
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 1bbbdb83a..09686f7d9 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -20,7 +20,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: user.rb,v 1.41 2008-03-25 17:25:09 francis Exp $ +# $Id: user.rb,v 1.42 2008-03-31 17:20:59 francis Exp $ require 'digest/sha1' @@ -41,8 +41,12 @@ class User < ActiveRecord::Base acts_as_solr :fields => [ {:name => { :boost => 5.0 }}, - { :created_at => :date } + { :created_at => :date }, + { :variety => :string } ] + def variety + "user" + end def validate errors.add(:email, "doesn't look like a valid address") unless MySociety::Validate.is_valid_email(self.email) |