summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-16 21:00:41 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-16 21:00:41 +0100
commit7cdcbdc4b851b348bb21e0f2ff437138e8b9884b (patch)
tree908a588600022f5bfeabd9b9edcfed2eed01a45b /app/models
parent0d5fd7ba5092b4d00826f3572448bb54ac2ec983 (diff)
Added page caching for the gemeinschaft_setup#new page.
Diffstat (limited to 'app/models')
-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