DanKnox/websocket-rails — pull request #41 by nessche (2013-01-30 10:36:30+00:00)
Title: routes.rb-like targets for events

Hi,

I basically wanted to be able to specify the target for subscribed events in the events.rb file in the same fashion used in routes.rb. In other words with this patch the syntax

subscribe :simplify, 'complex_product#simplify'

is equivalent to

subscribe :simplify, to: ComplexProductController, with_method: :simplify

I haven't update the README.rd, because I'd rather wait for your opinion on this, before putting extra effort into something you don't like / you don't want to use.

`event_map-spec.rb` contains now examples to verify the new behaviour.