[openstreetmap/openstreetmap-website] DB seed script (PR #6432)
Pablo Brasero
notifications at github.com
Thu Oct 9 13:16:30 UTC 2025
@pablobm commented on this pull request.
> @@ -9,3 +9,39 @@
# Character.create(name: 'Luke', movie: movies.first)
Language.load(Rails.root.join("config/languages.yml"))
+
+def log(*)
+ puts(*) # rubocop:disable Rails/Output
+end
+
+display_name = "admin"
+password = "openstreetmap"
+email = "admin_#{SecureRandom.uuid}@example.com"
+role = "administrator"
+
+admin = User.find_or_create_by!(:display_name => display_name) do |user|
Sounds good. I'm thinking of two options:
1. I turn this into a `dev:populate` task, with guards to avoid running on production.
2. I remove this script (keeping the refactor and the bin/yarn thing), and we focus on getting your `dev:populate` task (https://github.com/openstreetmap/openstreetmap-website/pull/3101) through. This can be augmented with the new `Oauth::Util.register_apps` utility.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6432#discussion_r2416765396
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6432/review/3318927972 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251009/cb92709a/attachment.htm>
More information about the rails-dev
mailing list