Skip to content

Action Cable: client side 💅 #24039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 4, 2016
Merged

Conversation

javan
Copy link
Contributor

@javan javan commented Mar 4, 2016

  • Moves the default mount path to ActionCable::INTERNAL to ensure it stays synced with action_cable.js (via action_cable.coffee.erb)
  • Restores ActionCable#getConfig to its original, intended design for reading any action-cable-* meta tag
  • Minor internal refactoring for clarity and convenience

/cc @maclover7, @jeremy

@rails-bot
Copy link

r? @senny

(@rails-bot has picked a reviewer for you, use r? to override)

@identifier = JSON.stringify(params)
extend(this, mixin)
@subscriptions.add(this)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this logic performed elsewhere, I think we still want to do this? Could be missing something -- not super familiar with CoffeeScript :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved it to Subscriptions#create (see ~13 lines down in this PR). Before, Subscriptions#create constructed Subscription instances with a reference to @subscriptions and the subscription would then add itself to the collection. I'm not sure why I implemented that way originally. Now, Subscriptions#create makes a Subscription and then adds it to its collection.

In short: same end result, less confusing circular object passing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, gotcha. 👍 for less circular logic. :)

@maclover7
Copy link
Contributor

In general, 👍 for refactoring this a bit.

@jeremy
Copy link
Member

jeremy commented Mar 4, 2016

❤️

jeremy added a commit that referenced this pull request Mar 4, 2016
@jeremy jeremy merged commit 2cafbd3 into rails:master Mar 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants