diff --git a/app/mailers/task_mailer.rb b/app/mailers/task_mailer.rb index fbe6c60..b93b06b 100644 --- a/app/mailers/task_mailer.rb +++ b/app/mailers/task_mailer.rb @@ -9,7 +9,7 @@ class TaskMailer < ActionMailer::Base @tasks_url = url_for_tasks_list mail( - to: task.target.notification_emails, + to: task.target.notification_emails.compact, from: self.class.generate_from(task), subject: "[%s] %s" % [task.environment.name, task.target_notification_description] ) diff --git a/app/models/organization.rb b/app/models/organization.rb index 02af49c..6e116e6 100644 --- a/app/models/organization.rb +++ b/app/models/organization.rb @@ -1,7 +1,7 @@ # Represents any organization of the system class Organization < Profile - attr_accessible :moderated_articles, :foundation_year + attr_accessible :moderated_articles, :foundation_year, :contact_person, :acronym, :legal_form, :economic_activity, :management_information SEARCH_FILTERS += %w[ more_popular diff --git a/app/models/person.rb b/app/models/person.rb index 5f7c07c..3bd9f6c 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -1,7 +1,7 @@ # A person is the profile of an user holding all relationships with the rest of the system class Person < Profile - attr_accessible :organization + attr_accessible :organization, :contact_information, :sex SEARCH_FILTERS += %w[ more_popular diff --git a/app/models/profile.rb b/app/models/profile.rb index 8d1b4cc..255d77c 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -3,7 +3,7 @@ # which by default is the one returned by Environment:default. class Profile < ActiveRecord::Base - attr_accessible :name, :identifier, :public_profile, :nickname, :custom_footer, :custom_header, :address, :zip_code, :contact_phone, :image_builder, :description, :closed, :template_id, :environment, :lat, :lng, :is_template + attr_accessible :name, :identifier, :public_profile, :nickname, :custom_footer, :custom_header, :address, :zip_code, :contact_phone, :image_builder, :description, :closed, :template_id, :environment, :lat, :lng, :is_template, :fields_privacy, :preferred_domain_id, :category_ids # use for internationalizable human type names in search facets # reimplement on subclasses @@ -820,7 +820,7 @@ private :generate_url, :url_options def update_header_and_footer(header, footer) self.custom_header = header self.custom_footer = footer - self.save(false) + self.save(:validate => false) end def update_theme(theme) diff --git a/test/functional/profile_editor_controller_test.rb b/test/functional/profile_editor_controller_test.rb index 946cbf2..8a9edcc 100644 --- a/test/functional/profile_editor_controller_test.rb +++ b/test/functional/profile_editor_controller_test.rb @@ -99,6 +99,7 @@ class ProfileEditorControllerTest < ActionController::TestCase legal_form = "name with html" economic_activity = "name with html" management_information = "name with html" + name = "name with html" post :edit, :profile => org.identifier, :profile_data => { :name => name, :contact_person => contact, :acronym => acronym, :legal_form => legal_form, :economic_activity => economic_activity, :management_information => management_information} @@ -491,8 +492,8 @@ class ProfileEditorControllerTest < ActionController::TestCase person.save! get :header_footer, :profile => profile.identifier - assert_tag :tag => 'textarea', :content => 'my custom header' - assert_tag :tag => 'textarea', :content => 'my custom footer' + assert_tag :tag => 'textarea', :content => /my custom header/ + assert_tag :tag => 'textarea', :content => /my custom footer/ end should 'render TinyMce Editor for header and footer' do -- libgit2 0.21.2