
エントリーの編集

エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
Ruby on Rails: How do you explicitly define plural names and singular names in Rails?
記事へのコメント3件
- 注目コメント
- 新着コメント
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Ruby on Rails: How do you explicitly define plural names and singular names in Rails?
For example, I'm using "Bonus" as my model, so I'd expect "bonuses" to be the plural form and "bo... For example, I'm using "Bonus" as my model, so I'd expect "bonuses" to be the plural form and "bonus" to be the singular form. However, in Ruby, this results in: "bonus".pluralize # bonus "bonuses".singularize # bonuse So, when I do a "has_many :bonuses", for example, it doesn't use the Bonus.rb model (since Ruby expects a Bonuse.rb model instead). Is there a way to correct that in Ruby on Rails s
2017/09/14 リンク