lib/doggy/models/monitor.rb in doggy-2.0.32 vs lib/doggy/models/monitor.rb in doggy-2.0.33

- old
+ new

@@ -66,16 +66,19 @@ def validate ensure_renotify_interval_valid end - def toggle_mute!(action) + def toggle_mute!(action, body=nil) return unless ['mute', 'unmute'].include?(action) && id - attributes = request(:post, "#{ resource_url(id) }/#{action}") + attributes = request(:post, "#{ resource_url(id) }/#{action}", body) if message = attributes['errors'] Doggy.ui.error(message) else self.attributes = attributes + if local_version = Doggy::Model.find_local(id) + self.path = local_version.path + end save_local end end def human_url