Skip to content

Commit e2e7795

Browse files
Merge pull request #18 from rootstrap/task/imporve-readme
Add gif to readme
2 parents a627254 + 00f3349 commit e2e7795

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66

77
Get a chat for your ActiveAdmin app out of the box.
88

9+
![](active_admin_chat_gif.gif)
10+
11+
## Prerequisites
12+
- It assumes you have models for your admins and users in place.
13+
- It assumes that your users have an `email` attribute.
14+
- For production you need to configure ActionCable by providing it with a Redis or Postgres connection in `config/cable.yml`.
15+
916
## Installation
1017
Add to Gemfile:
1118
```ruby
@@ -23,8 +30,8 @@ $ rails generate active_admin_chat:install
2330
```
2431
It will generate:
2532
- `Conversation` and `Message` models and migrations.
26-
- Initializer that configures the model names for conversation, message, admin user and user
27-
- Default chat page
33+
- Initializer that configures the model names for conversation, message, admin user and user.
34+
- Default chat page.
2835

2936
You can customize the namings of the models when installing ActiveAdminChat with the usage of the `--conversation_model_name`, `--message_model_name`, `--admin_user_model_name` and `--user_model_name` flags.
3037

@@ -48,6 +55,9 @@ And including of JS to `app/assets/javascripts/active_admin.js`:
4855
#= require active_admin_chat
4956
```
5057

58+
### Example diagram
59+
![](admin_chat_diagram.png?raw=true "Chat diagram")
60+
5161
## Usage
5262
All you need to get the chat up and running is to authenticate your users in the websocket connection in `app/channels/application_cable/connection.rb`. It's important that you identify them as the `current_user` here, this will be used by the gem internally.
5363

@@ -117,11 +127,6 @@ ActiveAdmin.register_chat User do
117127
end
118128
```
119129

120-
## Prerequisites
121-
- It assumes you have models for your admins and users in place.
122-
- It assumes that your users have an `email` attribute.
123-
- For production you need to configure ActionCable by providing it with a Redis or Postgres connection in `config/cable.yml`.
124-
125130
## Contributing
126131
Bug reports (please use Issues) and pull requests are welcome on GitHub at https://github.com/rootstrap/active_admin_chat. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
127132

active_admin_chat_gif.gif

12.7 MB
Loading

admin_chat_diagram.png

13.6 KB
Loading

0 commit comments

Comments
 (0)