Commit 75a9f6014513c61520eb0c57b678ff07ce92bc32
Committed by
Braulio Bhavamitra
1 parent
c8331c69
Exists in
master
and in
29 other branches
Fix mass-assignment on CreateCommunityTask
Showing
2 changed files
with
6 additions
and
2 deletions
Show diff stats
app/models/community.rb
1 | class Community < Organization | 1 | class Community < Organization |
2 | 2 | ||
3 | - attr_accessible :accessor_id, :accessor_type, :role_id, :resource_id, :resource_type, :address_reference, :district, :tag_list, :language | 3 | + attr_accessible :accessor_id, :accessor_type, :role_id, :resource_id, :resource_type |
4 | + attr_accessible :address_reference, :district, :tag_list, :language, :description | ||
4 | after_destroy :check_invite_member_for_destroy | 5 | after_destroy :check_invite_member_for_destroy |
5 | 6 | ||
6 | def self.type_name | 7 | def self.type_name |
app/models/create_community.rb
@@ -9,11 +9,14 @@ class CreateCommunity < Task | @@ -9,11 +9,14 @@ class CreateCommunity < Task | ||
9 | alias :environment :target | 9 | alias :environment :target |
10 | alias :environment= :target= | 10 | alias :environment= :target= |
11 | 11 | ||
12 | + attr_accessible :environment, :requestor, :target | ||
13 | + | ||
12 | acts_as_having_image | 14 | acts_as_having_image |
13 | 15 | ||
14 | - DATA_FIELDS = Community.fields + ['name', 'closed'] | 16 | + DATA_FIELDS = Community.fields + ['name', 'closed', 'description'] |
15 | DATA_FIELDS.each do |field| | 17 | DATA_FIELDS.each do |field| |
16 | settings_items field.to_sym | 18 | settings_items field.to_sym |
19 | + attr_accessible field.to_sym | ||
17 | end | 20 | end |
18 | 21 | ||
19 | def validate | 22 | def validate |