teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

2

追記

2020/06/08 12:02

投稿

winterboum
winterboum

スコア23653

answer CHANGED
@@ -1,3 +1,10 @@
1
1
  next if Call.where(statu: "APP").blank?
2
2
  が逆ですね
3
- next if Call.where(statu: "APP").present?
3
+ next if Call.where(statu: "APP").present?
4
+
5
+ 『直近1ヶ月で更新されていない』もおかしいですね
6
+ next if self.where('created_at > ?', "1.month.ago.all_day").blank?
7
+ ですと、「新規作成がここ一月」であるものがない場合は パス(importしない)
8
+ ですね。
9
+ next if customer.updated_at < Time.now - 1.month
10
+ では?

1

typo修正

2020/06/08 12:02

投稿

winterboum
winterboum

スコア23653

answer CHANGED
@@ -1,3 +1,3 @@
1
1
  next if Call.where(statu: "APP").blank?
2
2
  が逆ですね
3
- next if Call.where(statu: "APP").prexent?
3
+ next if Call.where(statu: "APP").present?