Explorar o código

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

Justin Faulkner %!s(int64=7) %!d(string=hai) anos
pai
achega
9ea9599eaa
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  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