Browse Source

Specify where to define before_action method in README under Authentication > Other (#162)

Justin Faulkner 6 years ago
parent
commit
9ea9599eaa
1 changed files with 8 additions and 0 deletions
  1. 8 0
      README.md

+ 8 - 0
README.md

@@ -153,6 +153,14 @@ Specify a `before_action` method to run in `blazer.yml`.
 ```yml
 before_action: require_admin
 ```
+Then define the custom authentication method in your `application_controller.rb`.
+
+```ruby
+def require_admin
+  # depending on your auth, maybe something like...
+  current_user && current_user.admin?
+end
+```
 
 ## Queries