camp17-extra / activities

活動記録とわからないことをissueに沢山書きまくるリポジトリ
0 stars 0 forks source link

配列の中にある配列にアスタリスクを付けると中にある配列が展開される #13

Open popmac opened 7 years ago

popmac commented 7 years ago

以下のようなコードの仕組みを解明する

@users = [current_user, *User.where.not(id: current_user.id).to_a]