Screened ip address can be edited, deleted, and changed to allow or block.

This commit is contained in:
Neil Lalonde
2013-10-22 16:30:30 -04:00
parent b8d586251c
commit 7d582fbee3
16 changed files with 259 additions and 16 deletions

View File

@ -23,6 +23,11 @@ module ScreeningModel
self.action_type ||= self.class.actions[self.class.df_action]
end
def action_name=(arg)
raise ArgumentError.new("Invalid action type #{arg}") if arg.nil? or !self.class.actions.has_key?(arg.to_sym)
self.action_type = self.class.actions[arg.to_sym]
end
def record_match!
self.match_count += 1
self.last_match_at = Time.zone.now