Commit e172d1970b6e7d552c89afbad170e5b26c749112

Authored by Braulio Bhavamitra
1 parent 25b98859

Expire LocationBlock cache on profile's location change

(ActionItem3217)
Showing 1 changed file with 1 additions and 0 deletions   Show diff stats
app/controllers/my_profile/maps_controller.rb
@@ -16,6 +16,7 @@ class MapsController < MyProfileController @@ -16,6 +16,7 @@ class MapsController < MyProfileController
16 16
17 Profile.transaction do 17 Profile.transaction do
18 if profile.update_attributes!(params[:profile_data]) 18 if profile.update_attributes!(params[:profile_data])
  19 + BlockSweeper.expire_blocks profile.blocks.select{ |b| b.class == LocationBlock }
19 session[:notice] = _('Address was updated successfully!') 20 session[:notice] = _('Address was updated successfully!')
20 redirect_to :action => 'edit_location' 21 redirect_to :action => 'edit_location'
21 end 22 end