From 5c2a0532edf49a51b3ad5e999c8ed909dfae4fdb Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Mon, 2 Feb 2015 14:25:06 -0300 Subject: [PATCH] Fix edition of visible attribute for communities --- app/controllers/my_profile/profile_editor_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/my_profile/profile_editor_controller.rb b/app/controllers/my_profile/profile_editor_controller.rb index 5d5aa2a..3e6cdd6 100644 --- a/app/controllers/my_profile/profile_editor_controller.rb +++ b/app/controllers/my_profile/profile_editor_controller.rb @@ -21,7 +21,7 @@ class ProfileEditorController < MyProfileController Profile.transaction do Image.transaction do begin - params[:profile_data][:visible] = params[:profile_data][:visible] == '0' unless profile.person? + params[:profile_data][:visible] = params[:profile_data][:visible] == '0' if profile.community? && params[:profile_data].present? @plugins.dispatch(:profile_editor_transaction_extras) @profile_data.update_attributes!(params[:profile_data]) redirect_to :action => 'index', :profile => profile.identifier -- libgit2 0.21.2