1
0
mirror of https://github.com/projekteuler/projekteuler.git synced 2026-01-26 18:18:51 +01:00

Add controller for Problems with index and show actions

This commit is contained in:
2014-12-29 16:16:57 +01:00
parent d1470f391e
commit 06ab2e4cab
11 changed files with 94 additions and 2 deletions

View File

@@ -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