1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

8 commits

Author SHA1 Message Date
David Heinemeier Hansson
bf40bddfce Get ready to merge into Rails 2015-12-14 15:48:54 +01:00
Rafael Mendonça França
9f1938d9c1 Merge pull request #69 from mieko/callbacks
Use ActiveSupport::Callbacks for Channel subscription callbacks.
2015-10-23 20:15:40 -02:00
Pratik Naik
84b1f0a3e6 Send subscription confirmation from server to the client to avoid race conditions.
Without this, it's very easy to send messages over a subscription even before the
redis pubsub has been fully initialized.

Now we delay calling the subscription#connected method on the client side until we
receive a subscription confirmation message from the server.
2015-10-16 21:11:21 -05:00
Jeremy Daer
4d6f1b0cbe Shush some low-hanging Ruby warnings 2015-10-16 00:32:46 -07:00
Mike A. Owens
cf426a7ee6 Use ActiveSupport::Callbacks for Channel subscription callbacks.
* Rely on AS::Callbacks for callback handling.
 * Add before_subscribe, after_subscribe, before_unsubscribe and
   after_unsubscribe convenience methods
 * alias on_subscribe and on_unsubscribe to after_subscribe and
   after_unsubscribe, respectively.
 * Remove `subscribed` and `unsubscribed` from the callback chain:
   these methods are now executed as the subject of the callbacks.
 * Update portions of ActionCable to use the more specific
   callback names.
2015-08-24 13:46:41 -04:00
Cristian Bica
a97a1fc745 Improve channel actions dispatcher to allow inheritance/mixins
Fixes #14
2015-07-23 15:00:30 +03:00
Pratik Naik
e1da6814b4 Always load all the stub files 2015-07-13 11:30:52 -05:00
Pratik Naik
1af531dcf7 Add some more tests 2015-07-12 11:44:56 -05:00
Renamed from test/channel_test.rb (Browse further)