Commit bdc26ce2fe5bd3aebc09c95c4a2eb13ba8cda550
Exists in
master
and in
27 other branches
Merge branch 'AI3206_profile_categories_bug' into 'master'
Ai3206 profile categories bug Fixing bug: http://noosfero.org/Development/ActionItem3206 See merge request !253
Showing
3 changed files
with
3 additions
and
3 deletions
Show diff stats
app/controllers/my_profile/cms_controller.rb
| ... | ... | @@ -232,7 +232,7 @@ class CmsController < MyProfileController |
| 232 | 232 | @current_category = Category.find(params[:category_id]) |
| 233 | 233 | @categories = @current_category.children |
| 234 | 234 | end |
| 235 | - render :template => 'shared/update_categories', :locals => { :category => @current_category } | |
| 235 | + render :template => 'shared/update_categories', :locals => { :category => @current_category, :object_name => 'article' } | |
| 236 | 236 | end |
| 237 | 237 | |
| 238 | 238 | def publish | ... | ... |
app/controllers/my_profile/profile_editor_controller.rb
| ... | ... | @@ -54,7 +54,7 @@ class ProfileEditorController < MyProfileController |
| 54 | 54 | @current_category = Category.find(params[:category_id]) |
| 55 | 55 | @categories = @current_category.children |
| 56 | 56 | end |
| 57 | - render :template => 'shared/update_categories', :locals => { :category => @current_category } | |
| 57 | + render :template => 'shared/update_categories', :locals => { :category => @current_category, :object_name => 'profile_data' } | |
| 58 | 58 | end |
| 59 | 59 | |
| 60 | 60 | def header_footer | ... | ... |
app/views/shared/update_categories.js.erb
| 1 | 1 | <% |
| 2 | 2 | content = render :partial => 'shared/select_categories', |
| 3 | - :locals => {:object_name => 'article', :multiple => true}, :layout => false | |
| 3 | + :locals => {:object_name => object_name, :multiple => true}, :layout => false | |
| 4 | 4 | %> |
| 5 | 5 | jQuery('#select-categories').html('<%= j(content) %>'); | ... | ... |