summaryrefslogtreecommitdiff
path: root/app/models/gemeinschaft_setup.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-16 21:02:18 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-16 21:02:18 +0100
commita74efe4bb1b5afeaf892d18ba2e7969ed17b4099 (patch)
tree908a588600022f5bfeabd9b9edcfed2eed01a45b /app/models/gemeinschaft_setup.rb
parent0d5fd7ba5092b4d00826f3572448bb54ac2ec983 (diff)
parent7cdcbdc4b851b348bb21e0f2ff437138e8b9884b (diff)
Merge branch 'page_caching' into develop
Diffstat (limited to 'app/models/gemeinschaft_setup.rb')
-rw-r--r--app/models/gemeinschaft_setup.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/gemeinschaft_setup.rb b/app/models/gemeinschaft_setup.rb
index b445b21..0b3eeae 100644
--- a/app/models/gemeinschaft_setup.rb
+++ b/app/models/gemeinschaft_setup.rb
@@ -5,4 +5,13 @@ class GemeinschaftSetup < ActiveRecord::Base
accepts_nested_attributes_for :sip_domain
belongs_to :country
belongs_to :language
+
+ # Remove the cache which was created by the heater rake task.
+ #
+ after_create :expire_cache
+
+ private
+ def expire_cache
+ ActionController::Base.expire_page(Rails.application.routes.url_helpers.new_gemeinschaft_setup_path)
+ end
end