複数の配列を結合するのに、
ruby
1EventUser.where(user_id: [user.id, user.followings.ids])
のように書くと、POSTMANでRepresentation of type Array cannot be mergedって怒られます!
なので
ruby
1user_ids = [user.id, [user.followings.ids]].flatten 2EventUser.where(user_id: user_ids)
のように書いたのですが、またもや同じエラーが返ってきます!
配列を結合する方法を知っている方いましたら助けてください笑
ちなみに
ruby
1user_ids = user.followings.ids << user.id 2EventUser.where(user_id: user_ids)
でもダメでした、、、
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。