From 7bcb6695fa41a8b89c7ffe43341631c3f8049630 Mon Sep 17 00:00:00 2001 From: Bertocq Date: Tue, 5 Apr 2016 13:58:29 +0200 Subject: [PATCH] Simplify the user verification code for console --- README.md | 6 +----- README_ES.md | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 4732e530c..a56c5bab0 100644 --- a/README.md +++ b/README.md @@ -63,11 +63,7 @@ You can use the default admin user from the seeds file: But for some actions like voting, you will need to verify him, opening a console with `rails console` and then: ``` -a = User.first -a.verified_at = Date.today -a.level_two_verified_at = Date.today -a.residence_verified_at = Date.today -a.save +User.first.update_attributes(verified_at: Date.today, residence_verified_at: Date.today, level_two_verified_at: Date.today) ``` ### OAuth diff --git a/README_ES.md b/README_ES.md index c6e1867ec..fd5b79324 100644 --- a/README_ES.md +++ b/README_ES.md @@ -62,11 +62,7 @@ Puedes usar el usuario administrador por defecto del fichero seeds: Pero para ciertas acciones, como apoyar, necesitarás verificarle, abre una consola con `rails console` y escribe: ``` -a = User.first -a.verified_at = Date.today -a.level_two_verified_at = Date.today -a.residence_verified_at = Date.today -a.save +User.first.update_attributes(verified_at: Date.today, residence_verified_at: Date.today, level_two_verified_at: Date.today) ``` ### OAuth