diff --git a/app/controllers/public/profile_controller.rb b/app/controllers/public/profile_controller.rb index b13b040..f7d25a5 100644 --- a/app/controllers/public/profile_controller.rb +++ b/app/controllers/public/profile_controller.rb @@ -12,4 +12,12 @@ class ProfileController < ApplicationController @tagged = profile.find_tagged_with(@tag) end + def communities + @communities = profile.communities + end + + def enterprises + @enterprises = profile.enterprises + end + end diff --git a/app/models/person.rb b/app/models/person.rb index f1c7304..c84bd11 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -28,10 +28,14 @@ class Person < Profile memberships(:type => Enterprise.name) end + alias :enterprises :enterprise_memberships + def community_memberships memberships(:type => Community.name) end + alias :communities :community_memberships + def info person_info diff --git a/app/views/profile/communities.rhtml b/app/views/profile/communities.rhtml new file mode 100644 index 0000000..0cd6e08 --- /dev/null +++ b/app/views/profile/communities.rhtml @@ -0,0 +1,11 @@ +