diff options
author | Francis Irving <francis@mysociety.org> | 2010-07-14 16:00:12 +0100 |
---|---|---|
committer | Francis Irving <francis@mysociety.org> | 2010-07-14 16:00:12 +0100 |
commit | 2b91bbb4db04b6f3935478a3f6e8a0fe61fc06fb (patch) | |
tree | 154776728f256f302419913e84882a6991532de5 /app | |
parent | f4164cd4099edcc7c7ad947ce128544d42027498 (diff) |
Remove mapping from photo to user
Diffstat (limited to 'app')
-rw-r--r-- | app/models/profile_photo.rb | 3 | ||||
-rw-r--r-- | app/models/user.rb | 1 |
2 files changed, 1 insertions, 3 deletions
diff --git a/app/models/profile_photo.rb b/app/models/profile_photo.rb index 4cf32ef4b..0811978fe 100644 --- a/app/models/profile_photo.rb +++ b/app/models/profile_photo.rb @@ -23,8 +23,7 @@ class ProfilePhoto < ActiveRecord::Base WIDTH = 96 HEIGHT = 96 - has_one :user - validates_presence_of :user + # has_one :user # deliberately don't strip_attributes, so keeps raw photo properly diff --git a/app/models/user.rb b/app/models/user.rb index 4cd3394b4..00fd332ad 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -283,7 +283,6 @@ class User < ActiveRecord::Base old_profile_photo = self.profile_photo self.profile_photo = nil end - new_profile_photo.user = self self.profile_photo = new_profile_photo end if !old_profile_photo.nil? |