customer = Feedback.includes(:user).where("('created_at' >= ? and
'created_at' < ? and how_did_you_hear = ? and
users.user_type = ? )",date_start,date_end,value,"customer").count
此代码不仅与所有反馈匹配 Feedback.user.user_type = "customer"
我怎样才能解决这个问题?
customer = Feedback.includes(:user).where("('created_at' >= ? and
'created_at' < ? and how_did_you_hear = ? and
users.user_type = ? )",date_start,date_end,value,"customer").count
此代码不仅与所有反馈匹配 Feedback.user.user_type = "customer"
我怎样才能解决这个问题?