mirror of
https://github.com/projekteuler/projekteuler.git
synced 2026-01-27 10:38:50 +01:00
Add controller for Problems with index and show actions
This commit is contained in:
@@ -6,9 +6,14 @@
|
||||
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
|
||||
# Mayor.create(name: 'Emanuel', city: cities.first)
|
||||
|
||||
Translation.delete_all
|
||||
Problem.delete_all
|
||||
|
||||
for i in 1..103 do
|
||||
Translation.create(
|
||||
translation = Translation.create(
|
||||
problem_id: i,
|
||||
title: "Problem Nummer #{i}",
|
||||
content: "Das hier ist der Inhalt von <b>Problem #{i}</b>.<br />Hier ist die zweite Zeile."
|
||||
)
|
||||
end
|
||||
Problem.create(id: i, translation: translation)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user