lib/activehook/hook.rb in activehook-0.1.7 vs lib/activehook/hook.rb in activehook-0.1.8
- old
+ new
@@ -1,7 +1,9 @@
module ActiveHook
class Hook
+ alias :read_attribute_for_serialization :send
+
attr_accessor :token, :uri, :id, :key, :retry_max, :retry_time, :created_at
attr_reader :errors, :payload
def initialize(options = {})
options = defaults.merge(options)
@@ -69,9 +71,13 @@
end
def valid?
validate!
@errors.empty?
+ end
+
+ def self.model_name
+ @_model_name ||= ActiveModel::Name.new(self)
end
private
def save_hook