Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rescheduled 🗓️
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
c3lingo
rescheduled 🗓️
Commits
bef7e6dc
Verified
Commit
bef7e6dc
authored
3 months ago
by
Felix Eckhofer
Browse files
Options
Downloads
Patches
Plain Diff
Fix seeding an empty database
parent
0fb14d20
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/models/user.rb
+2
-2
2 additions, 2 deletions
app/models/user.rb
db/seeds.rb
+3
-3
3 additions, 3 deletions
db/seeds.rb
with
5 additions
and
5 deletions
app/models/user.rb
+
2
−
2
View file @
bef7e6dc
...
...
@@ -63,7 +63,7 @@ class User < ApplicationRecord
end
def
cleanup_languages
self
.
languages_from
=
self
.
languages_from
.
gsub
(
/\s+/
,
''
).
downcase
self
.
languages_to
=
self
.
languages_to
.
gsub
(
/\s+/
,
''
).
downcase
self
.
languages_from
=
self
.
languages_from
&
.
gsub
(
/\s+/
,
''
)
&
.
downcase
self
.
languages_to
=
self
.
languages_to
&
.
gsub
(
/\s+/
,
''
)
&
.
downcase
end
end
This diff is collapsed.
Click to expand it.
db/seeds.rb
+
3
−
3
View file @
bef7e6dc
...
...
@@ -46,7 +46,7 @@ Conference.find_or_create_by!(slug: "37c3") do |c|
c
.
location
=
"Congress Center Hamburg"
end
Conference
.
find_or_create_by!
(
slug:
"38c3"
)
.
tap
do
|
c
|
Conference
.
find_or_create_by!
(
slug:
"38c3"
)
do
|
c
|
c
.
name
=
"38th Chaos Communication Congress (de-en)"
c
.
time_zone
=
"Berlin"
c
.
starts_at
=
DateTime
.
parse
(
"27 December 2024 10:30 CET"
)
...
...
@@ -59,7 +59,7 @@ Conference.find_or_create_by!(slug: "38c3").tap do |c|
c
.
save!
end
Conference
.
find_or_create_by!
(
slug:
"38c3-more"
)
.
tap
do
|
c
|
Conference
.
find_or_create_by!
(
slug:
"38c3-more"
)
do
|
c
|
c
.
name
=
"38th Chaos Communication Congress (more languages)"
c
.
time_zone
=
"Berlin"
c
.
starts_at
=
DateTime
.
parse
(
"27 December 2024 10:30 CET"
)
...
...
@@ -74,7 +74,7 @@ end
if
Rails
.
env
.
development?
%w[coverage fog comedy adjust forge fail vigorous promise chemistry conception meat storage certain warm develop civilian cousin injection hammer health appetite conventional good snake grant suspect atmosphere linen wrong deal calf sea management silence watch nuance loan quit convert failure bracket slice sweat treaty plot still chimpanzee assume functional marsh dream mail state dorm kid formation secular agile beach guide salesperson merit goalkeeper incongruous cart pig joystick regulation apparatus myth patent glue behead flu departure spectrum parking indication delay hesitate viable lay treat cooperative sensation auction sphere stain tap pass]
.
each
do
|
username
|
User
.
find_or_create_by
(
name:
username
)
.
tap
do
|
u
|
User
.
find_or_create_by
(
name:
username
)
do
|
u
|
u
.
email
=
"c3lingo+
#{
username
}
@x.moeffju.net"
u
.
invitation_token
=
"gargamel"
u
.
save!
...
...
This diff is collapsed.
Click to expand it.
Felix Eckhofer
@tribut
mentioned in commit
271a22f4
·
3 months ago
mentioned in commit
271a22f4
mentioned in commit 271a22f4d1b66636659038d7b481c84b715bf6f7
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment