[openstreetmap/openstreetmap-website] Create a dev:populate task to add fake data to your dev environment (#3101)
Robbendebiene
notifications at github.com
Mon Jun 21 09:16:33 UTC 2021
All right, took me a while, but now I've got a basic idea of how the ` PasswordHash.create()` function works. (I'm new to ruby and its syntax)
The code below is now working for me.
```
bundle exec rails runner '
pass_crypt, pass_salt = PasswordHash.create("test")
admin = User.find_or_create_by(
:email => "testuser10 at osm.org",
:email_valid => true,
:display_name => "testuser10",
:status => "confirmed",
:terms_seen => true,
:terms_agreed => Time.now.getutc,
:data_public => true,
:pass_crypt => pass_crypt,
:pass_salt => pass_salt
)
admin.save!'
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3101#issuecomment-864874169
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20210621/282e3277/attachment.htm>
More information about the rails-dev
mailing list