diff options
author | maxwell <maxwell@joindiaspora.com> | 2011-03-29 21:56:11 +0400 |
---|---|---|
committer | maxwell <maxwell@joindiaspora.com> | 2011-03-29 21:56:11 +0400 |
commit | 5392b5c6ef4208c7d15202773474402c83c2d318 (patch) | |
tree | c4c36d80bacb424aac399e8bb14dc002a88b0e4a /app/models/profile.rb | |
parent | aa478ddd5cc6e5a6def1590d999343233ef820b7 (diff) |
strip more than 5 tags when updating profile so people with broken profiles can update again
Diffstat (limited to 'app/models/profile.rb')
-rw-r--r-- | app/models/profile.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/profile.rb b/app/models/profile.rb index b0e7cefad..d45c29fbb 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -40,7 +40,9 @@ class Profile < ActiveRecord::Base :image_url_small, :birthday, :gender, :bio, :location, :searchable, :date, :tag_string belongs_to :person - + before_validation do + self.tag_string = self.tag_string.split[0..4].join(' ') + end before_save do self.build_tags end |