Commit 35366ee706add1e8a31be122d5739445d659f87c
1 parent
f0111e64
Exists in
master
and in
29 other branches
ActionItem14: moving belongs_to :user from Person to Profile: every profile must have an "owner"
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@684 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
app/models/person.rb
1 | # A person is the profile of an user holding all relationships with the rest of the system | 1 | # A person is the profile of an user holding all relationships with the rest of the system |
2 | class Person < Profile | 2 | class Person < Profile |
3 | acts_as_accessor | 3 | acts_as_accessor |
4 | - | ||
5 | - belongs_to :user | ||
6 | 4 | ||
7 | # has_many :friendships | 5 | # has_many :friendships |
8 | # has_many :friends, :class_name => 'Person', :through => :friendships | 6 | # has_many :friends, :class_name => 'Person', :through => :friendships |
app/models/profile.rb
@@ -36,6 +36,8 @@ class Profile < ActiveRecord::Base | @@ -36,6 +36,8 @@ class Profile < ActiveRecord::Base | ||
36 | 36 | ||
37 | acts_as_taggable | 37 | acts_as_taggable |
38 | 38 | ||
39 | + belongs_to :user | ||
40 | + | ||
39 | has_many :domains, :as => :owner | 41 | has_many :domains, :as => :owner |
40 | belongs_to :environment | 42 | belongs_to :environment |
41 | 43 |