Commit 7b9b2e23e458b317632ee9875170a8c6e374d16c
1 parent
66f69445
Exists in
master
and in
79 other branches
Refactor extended ProfileEditorController
Signed-off-by: Fabio Teixeira <fabio1079@gmail.com> Signed-off-by: Luciano Prestes <lucianopcbr@gmail.com>
Showing
1 changed file
with
1 additions
and
18 deletions
Show diff stats
lib/ext/profile_editor_controller.rb
... | ... | @@ -8,7 +8,7 @@ class ProfileEditorController |
8 | 8 | @profile_data = profile |
9 | 9 | @possible_domains = profile.possible_domains |
10 | 10 | |
11 | - edit_community_post_actions if request.post? | |
11 | + edit if request.post? | |
12 | 12 | end |
13 | 13 | |
14 | 14 | protected |
... | ... | @@ -20,21 +20,4 @@ class ProfileEditorController |
20 | 20 | end |
21 | 21 | end |
22 | 22 | |
23 | - def edit_community_post_actions | |
24 | - params[:profile_data][:fields_privacy] ||= {} if profile.person? && params[:profile_data].is_a?(Hash) | |
25 | - | |
26 | - Profile.transaction do | |
27 | - Image.transaction do | |
28 | - begin | |
29 | - @plugins.dispatch(:profile_editor_transaction_extras) | |
30 | - @profile_data.update_attributes!(params[:profile_data]) | |
31 | - | |
32 | - redirect_to :action => 'index', :profile => profile.identifier | |
33 | - rescue Exception => ex | |
34 | - profile.identifier = params[:profile] if profile.identifier.blank? | |
35 | - end | |
36 | - end | |
37 | - end | |
38 | - end | |
39 | - | |
40 | 23 | end | ... | ... |