回答編集履歴
1
if文の>が逆でした
test
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
.
|
13
13
|
|
14
14
|
def plan_destroy
|
15
|
-
Plan.where('end_on
|
15
|
+
Plan.where('end_on < ?', Date.today).each do |plan|
|
16
16
|
plan.destroy
|
17
17
|
end
|
18
18
|
end
|