Commit 470e4683ad92002c32162269e76894567f8dbf8a
Committed by
Antonio Terceiro
1 parent
dc19a117
Fix mass-assignment on CreateCommunityTask
(cherry picked from commit 75a9f6014513c61520eb0c57b678ff07ce92bc32)
Showing
2 changed files
with
6 additions
and
2 deletions
Show diff stats
app/models/community.rb
1 | 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 | 5 | after_destroy :check_invite_member_for_destroy |
5 | 6 | |
6 | 7 | def self.type_name | ... | ... |
app/models/create_community.rb
... | ... | @@ -6,11 +6,14 @@ class CreateCommunity < Task |
6 | 6 | alias :environment :target |
7 | 7 | alias :environment= :target= |
8 | 8 | |
9 | + attr_accessible :environment, :requestor, :target | |
10 | + | |
9 | 11 | acts_as_having_image |
10 | 12 | |
11 | - DATA_FIELDS = Community.fields + ['name', 'closed'] | |
13 | + DATA_FIELDS = Community.fields + ['name', 'closed', 'description'] | |
12 | 14 | DATA_FIELDS.each do |field| |
13 | 15 | settings_items field.to_sym |
16 | + attr_accessible field.to_sym | |
14 | 17 | end |
15 | 18 | |
16 | 19 | def validate | ... | ... |