{"id":17681727,"url":"https://github.com/phawk/action-cable-online-status","last_synced_at":"2025-05-12T23:12:24.156Z","repository":{"id":65272068,"uuid":"589187553","full_name":"phawk/action-cable-online-status","owner":"phawk","description":"YouTube episode demonstrating how to show which users are online using action cable","archived":false,"fork":false,"pushed_at":"2023-01-15T14:12:55.000Z","size":137,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T04:32:43.646Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phawk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-01-15T11:19:17.000Z","updated_at":"2024-03-19T22:19:46.000Z","dependencies_parsed_at":"2023-01-16T03:30:36.268Z","dependency_job_id":null,"html_url":"https://github.com/phawk/action-cable-online-status","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phawk%2Faction-cable-online-status","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phawk%2Faction-cable-online-status/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phawk%2Faction-cable-online-status/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phawk%2Faction-cable-online-status/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phawk","download_url":"https://codeload.github.com/phawk/action-cable-online-status/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253837460,"owners_count":21971984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-24T09:11:59.857Z","updated_at":"2025-05-12T23:12:24.136Z","avatar_url":"https://github.com/phawk.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Online status using action cable\n\nThis is a demo app to show you how to show the current online state of a user using ActionCable.\n\n## Creating the project\n\nThis project was generated using the following command.\n\n```sh\nrails new online_status --skip-jbuilder --skip-test --css=tailwind --javascript=esbuild\n```\n\n## Running the project\n\nTo get set up, run the `bin/setup` script, to install dependencies, create the database, migrate and seed it with some sample data.\n\nThen run `bin/dev` and `open localhost:3000`.\n\n## Creating the action cable channel\n\n```sh\n$ bin/rails g channel Online\n```\n\n### Making User.rb \"live\"\n\nAdd this to the top of the model\n\n```ruby\nafter_update_commit { broadcast_replace_to(\"online_users\") }\n```\n\nAnd this to your view file that you want to listen for changes\n\n```ruby\n\u003c%= turbo_stream_from \"online_users\" %\u003e\n```\n\n### License\n\nThis code is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphawk%2Faction-cable-online-status","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphawk%2Faction-cable-online-status","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphawk%2Faction-cable-online-status/lists"}