Permalink
Browse files

added default index option for actors

Signed-off-by: ezmobius <ez@engineyard.com>
  • Loading branch information...
1 parent aa48ed6 commit 8b8edc21c4d955edba84e080a730ea560ff7ac46 Benjamin Black committed with ezmobius Jan 28, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/nanite/dispatcher.rb
@@ -46,7 +46,7 @@ def dispatch_request(req)
_, prefix, meth = req.type.split('/')
begin
actor = @actors[prefix]
- res = actor.send(meth, req.payload)
+ res = actor.send((meth.nil? ? "index" : meth), req.payload)
rescue Exception => e
res = "#{e.class.name}: #{e.message}\n #{e.backtrace.join("\n ")}"
end

0 comments on commit 8b8edc2

Please sign in to comment.