7

I was thinking of creating a model called Reply. I was wondering if Rails knows that its plural form is replies and not replys?

alexchenco
  • 53,565
  • 76
  • 241
  • 413
  • 1
    Possible duplicate http://stackoverflow.com/questions/1185035/how-do-i-override-rails-naming-conventions – uday Oct 31 '12 at 04:30
  • Why not just try it? It would surly be faster to run `rails g model reply` and figure it out yourself. – user229044 Oct 31 '12 at 04:45

2 Answers2

16

I believe it internally relies on the pluralize method, so you can check in a rails console what is the result of a particular pluralisation :

"reply".pluralize
=> "replies"

So the answer to your question is yes ;)

pjam
  • 6,356
  • 5
  • 30
  • 40
3

Rails may or may not know the plural form of any word, but if it doesn't you can teach it by adding it to config/initializers/inflections.rb.

gaqzi
  • 3,707
  • 3
  • 30
  • 30