diff options
author | Peter Kozak <spag@golwen.net> | 2013-06-07 11:02:51 +0200 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-06-07 11:02:51 +0200 |
commit | 0c6d5d10c43467e898091f62c3b42b5abd59acf4 (patch) | |
tree | aba32834816f9d838324edc208a8cf859d567bdf /app/models | |
parent | 56ae31b855f0706441fbf69253364361bc743885 (diff) |
detect_attacks/report_attacks methods added
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/gemeinschaft_setup.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/models/gemeinschaft_setup.rb b/app/models/gemeinschaft_setup.rb index 4b4dd37..ee8e981 100644 --- a/app/models/gemeinschaft_setup.rb +++ b/app/models/gemeinschaft_setup.rb @@ -20,6 +20,28 @@ class GemeinschaftSetup < ActiveRecord::Base before_validation :format_default_area_code + def detect_attacks + if self[:detect_attacks] == nil + return true + end + return self[:detect_attacks] + end + + def detect_attacks=(value) + self[:detect_attacks] = value + end + + def report_attacks + if self[:report_attacks] == nil + return true + end + return self[:report_attacks] + end + + def report_attacks=(value) + self[:report_attacks] = value + end + private def expire_cache ActionController::Base.expire_page(Rails.application.routes.url_helpers.new_gemeinschaft_setup_path) |