From 7b9b2e23e458b317632ee9875170a8c6e374d16c Mon Sep 17 00:00:00 2001 From: Luciano Prestes Cavalcanti Date: Mon, 2 Mar 2015 16:49:35 -0300 Subject: [PATCH] Refactor extended ProfileEditorController --- lib/ext/profile_editor_controller.rb | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/lib/ext/profile_editor_controller.rb b/lib/ext/profile_editor_controller.rb index 1972764..e14fd25 100644 --- a/lib/ext/profile_editor_controller.rb +++ b/lib/ext/profile_editor_controller.rb @@ -8,7 +8,7 @@ class ProfileEditorController @profile_data = profile @possible_domains = profile.possible_domains - edit_community_post_actions if request.post? + edit if request.post? end protected @@ -20,21 +20,4 @@ class ProfileEditorController end end - def edit_community_post_actions - params[:profile_data][:fields_privacy] ||= {} if profile.person? && params[:profile_data].is_a?(Hash) - - Profile.transaction do - Image.transaction do - begin - @plugins.dispatch(:profile_editor_transaction_extras) - @profile_data.update_attributes!(params[:profile_data]) - - redirect_to :action => 'index', :profile => profile.identifier - rescue Exception => ex - profile.identifier = params[:profile] if profile.identifier.blank? - end - end - end - end - end -- libgit2 0.21.2