Commit fbdee132ab393bc8a3afe4f9abb746171f36d803

Authored by Hugo Melo
Committed by Braulio Bhavamitra
1 parent e707963e

Move requires_email to organization so that enterprise doesn't crash

app/models/community.rb
... ... @@ -2,7 +2,7 @@ class Community < Organization
2 2  
3 3 attr_accessible :accessor_id, :accessor_type, :role_id, :resource_id, :resource_type
4 4 attr_accessible :address_reference, :district, :tag_list, :language, :description
5   - attr_accessible :requires_email
  5 +
6 6 after_destroy :check_invite_member_for_destroy
7 7  
8 8 def self.type_name
... ... @@ -13,9 +13,6 @@ class Community < Organization
13 13 N_('Language')
14 14  
15 15 settings_items :language
16   - settings_items :requires_email, :type => :boolean
17   -
18   - alias_method :requires_email?, :requires_email
19 16  
20 17 extend SetProfileRegionFromCityState::ClassMethods
21 18 set_profile_region_from_city_state
... ...
app/models/organization.rb
... ... @@ -2,6 +2,10 @@
2 2 class Organization < Profile
3 3  
4 4 attr_accessible :moderated_articles, :foundation_year, :contact_person, :acronym, :legal_form, :economic_activity, :management_information, :cnpj, :display_name, :enable_contact_us
  5 + attr_accessible :requires_email
  6 +
  7 + settings_items :requires_email, type: :boolean
  8 + alias_method :requires_email?, :requires_email
5 9  
6 10 SEARCH_FILTERS = {
7 11 :order => %w[more_recent more_popular more_active],
... ...