Commit ec7a371b authored by John E. Vincent's avatar John E. Vincent

testing some watcher stuff

parent 9bcf0599
require 'digest/sha1'
module Noah module Noah
class Watcher < Model #NYI class Watcher < Model #NYI
# This is a "special rainbow" of a class # This is a "special rainbow" of a class
...@@ -12,9 +13,16 @@ module Noah ...@@ -12,9 +13,16 @@ module Noah
def validate def validate
super super
assert_present :client, :endpoint, :pattern assert_present :client
assert_present :endpoint
assert_present :pattern
assert_unique [:client, :endpoint, :pattern] assert_unique [:client, :endpoint, :pattern]
end end
def name
@name = Digest::SHA1.hexdigest "#{client}#{endpoint}#{pattern}"
end
end end
class Watchers class Watchers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment