アプリの鳥とやりたいとしましょうwhere
。pluck
word_type
まず、名詞であるすべてのを見つけたいと思います。
次に、word
属性を取得して、最終結果が次のようになるようにします。
名詞であるすべての単語。
["Lion", "Capybara", "Cat"]
私が試してみると:
@words = new Project.Collections.WordsCollection()
@words.where(word_type: "noun").pluck("word_type")
戻ります:
this.words.where({word_type: "noun"}).pluck is not a function