Created
June 16, 2011 16:46
-
-
Save clifton/1029662 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit b517816e0944df9d4e6885471b1fc4671355bfe4 | |
Author: Clifton King <[email protected]> | |
Date: Thu Jun 16 10:39:52 2011 -0500 | |
fixed creating a community | |
diff --git a/app/models/shareable.rb b/app/models/shareable.rb | |
index 6512439..dc3038c 100644 | |
--- a/app/models/shareable.rb | |
+++ b/app/models/shareable.rb | |
@@ -472,12 +472,12 @@ module Shareable | |
def allowed_groups=(groups) | |
add_admin_group | |
- admin_group = self.accessibles.get(self.portal.admin_group) | |
- accessibles_to_keep = admin_group ? [admin_group.id] : [] | |
- | |
self.is_public = groups.include?(AccountGroup::PUBLIC_GROUP_NAME) | |
if self.portal | |
+ admin_group = self.accessibles.get(self.portal.admin_group) | |
+ accessibles_to_keep = admin_group ? [admin_group.id] : [] | |
+ | |
if self.is_public? | |
if (accessible = self.accessibles.get('Portal', self.portal_id)) | |
accessible.include_children = self.portal.is_umbrella? | |
@@ -544,10 +544,10 @@ module Shareable | |
end | |
end | |
end | |
- end | |
- | |
- self.accessibles.each do |accessible| | |
- accessible.mark_for_destruction unless accessible.new_record? or accessibles_to_keep.include?(accessible.id) | |
+ | |
+ self.accessibles.each do |accessible| | |
+ accessible.mark_for_destruction unless accessible.new_record? or accessibles_to_keep.include?(accessible.id) | |
+ end | |
end | |
return self.allowed_groups |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment