Skip to content

Commit

Permalink
Quietly do nothing if the record doesn't exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith Rarick committed Jun 3, 2008
1 parent a424e83 commit 169b62d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/async_observer/extend.rb
Expand Up @@ -121,7 +121,8 @@ def run_async_hooks(hook, o)
end

def send_to_instance(id, selector, *args)
find(id).send(selector, *args)
x = find_by_id(id)
x.send(selector, *args) if x
end

def async_each_opts(selector, opts, *args)
Expand Down

0 comments on commit 169b62d

Please sign in to comment.