Commit 0d0d8a31c1c4b09496d7c408c0474fc91e3431c6
1 parent
204e7e61
Exists in
stable-spb-1.4
and in
8 other branches
Fix mass-assignment on CreateCommunityTask
Conflicts: app/models/create_community.rb
Showing
2 changed files
with
4 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
| ... | ... | @@ -14,9 +14,10 @@ class CreateCommunity < Task |
| 14 | 14 | |
| 15 | 15 | acts_as_having_image |
| 16 | 16 | |
| 17 | - DATA_FIELDS = Community.fields + ['name', 'closed'] | |
| 17 | + DATA_FIELDS = Community.fields + ['name', 'closed', 'description'] | |
| 18 | 18 | DATA_FIELDS.each do |field| |
| 19 | 19 | settings_items field.to_sym |
| 20 | + attr_accessible field.to_sym | |
| 20 | 21 | end |
| 21 | 22 | |
| 22 | 23 | def validate | ... | ... |