You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Rubocop ignore generator template folder
* Support namespacing and create outbox model file in model generator
* Downcase model_name argument
* Update README
* Fix namespacing when defining model_name. Add specs
* Bump version to 0.1.4
Copy file name to clipboardExpand all lines: README.md
+16-6Lines changed: 16 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,13 +37,16 @@ gem install active_outbox
37
37
38
38
## Usage
39
39
### Setup
40
-
Create an initializer under `config/initializers/active_outbox.rb`and setup the default outbox class to the `Outbox` model you will create in the next step.
40
+
Create the outbox table and model using the provided generator. Any model name can be passed as an argument but if empty it will default to `outboxes` and `Outbox` respectively.
After creating the initializer, create an `Outbox` table using the provided generator and corresponding model. Any model name can be passed as an argument but if empty it will default to just `outboxes`. The generated table name will be `model_name_outboxes`.
47
+
After running the migration, create an initializer under `config/initializers/active_outbox.rb` and setup the default outbox class to the new `Outbox` model you just created.
45
48
```bash
46
-
rails g active_outbox:model <optional model_name>
49
+
rails g active_outbox:install
47
50
```
48
51
49
52
To allow models to store Outbox records on changes, you will have to include the `Outboxable` concern.
@@ -71,8 +74,15 @@ By default our Outbox migration has an `aggregate_identifier` field which serves
71
74
```bash
72
75
rails g active_outbox:model <optional model_name> --uuid
73
76
```
74
-
### Multiple Outbox mappings
75
-
If more granularity is desired multiple `Outbox` classes can be configured. After creating the needed `Outbox` classes for each module you can specify multiple mappings in the initializer.
77
+
### Modularized Outbox Mappings
78
+
If more granularity is desired multiple outbox classes can be configured. Using the provided generators we can specify namespaces and the folder structure.
79
+
```bash
80
+
rails g active_outbox:model user_access/ --component-path packs/user_access
0 commit comments