Browse Source

fix spaces

for_activeadmin
Dmitrii Golub 13 years ago
parent
commit
0485aca7ca
  1. 5
      README.md

5
README.md

@ -24,6 +24,7 @@ Two default parameters
``` ```
Possible random patterns Possible random patterns
```ruby ```ruby
/\d{5}/ /\d{5}/
/\w{4,8}/ /\w{4,8}/
@ -32,17 +33,21 @@ Possible random patterns
see more https://github.com/benburkert/randexp see more https://github.com/benburkert/randexp
By default second factor authentication enabled for each user, you can change it with this method in your User mdoel: By default second factor authentication enabled for each user, you can change it with this method in your User mdoel:
```ruby ```ruby
def need_two_factor_authentication?(request) def need_two_factor_authentication?(request)
request.ip != '127.0.0.1' request.ip != '127.0.0.1'
end end
``` ```
this will disable two factor authentication for local users this will disable two factor authentication for local users
Your send sms logic should be in this method in your User model: Your send sms logic should be in this method in your User model:
```ruby ```ruby
def send_two_factor_authentication_code(code) def send_two_factor_authentication_code(code)
puts code puts code
end end
``` ```
This example just puts code in logs This example just puts code in logs

Loading…
Cancel
Save