Skip to content
This repository has been archived by the owner. It is now read-only.
An example of how to do realtime updates with Stimulus & ActionCable
Ruby HTML JavaScript CSS Shell
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.heroku Adding heorku specifc bits Sep 16, 2019
app Commenting what the action does Sep 16, 2019
bin Documenting setup in readme a bit harder Sep 16, 2019
config Correcting cable setup to work locally Sep 14, 2019
db bin/setup Sep 14, 2019
lib rails new RealtimePartialUpdateApp --webpack=stimulus Sep 14, 2019
log rails new RealtimePartialUpdateApp --webpack=stimulus Sep 14, 2019
public rails new RealtimePartialUpdateApp --webpack=stimulus Sep 14, 2019
storage rails new RealtimePartialUpdateApp --webpack=stimulus Sep 14, 2019
test Renaming the JS and channel to be more explicit Sep 16, 2019
tmp rails new RealtimePartialUpdateApp --webpack=stimulus Sep 14, 2019
vendor rails new RealtimePartialUpdateApp --webpack=stimulus Sep 14, 2019
.browserslistrc rails new RealtimePartialUpdateApp --webpack=stimulus Sep 14, 2019
.gitignore Adding outer spec Sep 14, 2019
.ruby-version Updating Ruby version to 2.6.4 Sep 14, 2019
Gemfile Bumping gems to latest Sep 16, 2019
Gemfile.lock Bumping gems to latest Sep 16, 2019
Procfile Adding heorku specifc bits Sep 16, 2019
README.md Fixing formatting - darn difference spaces Sep 16, 2019
Rakefile rails new RealtimePartialUpdateApp --webpack=stimulus Sep 14, 2019
app.json Adding better default values for app.json Sep 16, 2019
babel.config.js rails new RealtimePartialUpdateApp --webpack=stimulus Sep 14, 2019
config.ru rails new RealtimePartialUpdateApp --webpack=stimulus Sep 14, 2019
package.json rails new RealtimePartialUpdateApp --webpack=stimulus Sep 14, 2019
postcss.config.js rails new RealtimePartialUpdateApp --webpack=stimulus Sep 14, 2019
yarn.lock rails new RealtimePartialUpdateApp --webpack=stimulus Sep 14, 2019

README.md

Deploy

Realtime Partial Update App

This is a sample of how to use ActionCable & Stimulus to update partials in Rails 6.

Key files

Setting up locally

Pull down the repo & run:

brew install redis
./bin/setup
  • brew install redis You will need redis installed on your local machine & have it running for ActionCable to work.
  • bin/setup - runs bundler & yarn, then sets up the database.

Next you should be able to run:

rails s

To turn on the server, your port may vary but if you visit http://localhost:3000/comments you should be able to see the realtime updates when CRUD'ing objects.

You can’t perform that action at this time.