簡體   English   中英

Rails:has_and_belongs_to_many關聯中collection_singular_ids =方法的返回類型和值是什么?

[英]Rails: What is the return type and value of the collection_singular_ids= method in a has_and_belongs_to_many association?

在Rails中使用has_and_belongs_to_many關聯時,它將向模型添加一個稱為collection_singular_ids=的方法,其中collection_singular必須用關聯表的單數名稱替換。

此方法的返回類型和值是什么? 我查看了API ,但沒有找到它。

只是繼續嘗試。 如果成功,它將返回您傳遞的id數組,否則返回nil。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM