Skip to content

Commit

Permalink
Add documentation about Douglas' built-in before_filter
Browse files Browse the repository at this point in the history
  • Loading branch information
fteem committed Apr 3, 2017
1 parent b8d8487 commit 93551c9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,20 @@ class AddCreatedByAndUpdatedByTo<model-name> < ActiveRecord::Migration[5.0]
end
```

### Plug it into a controller

In your `ApplicationController` add a `before_action`:

```ruby
class ApplicationController
before_action :set_douglas_the_stamper
end
```

## Progress

- [x] Add migrations generator (https://github.com/fteem/douglas/pull/1)
- [x] Find way to hijack `current_user` and store in `RequestStore`
- [ ] Find way to plug-in `Douglas` in model lifecycle

## Development
Expand Down

0 comments on commit 93551c9

Please sign in to comment.