It's not stored anywhere. The rails convention is that the table name should be the plural lowercased, underscored form of the class name.
Rails knows your class is called Personne, so it will assume the table is personnes.
But, this is dangerous because in French, the plural form is not
constant ?
For sample a horse is called "cheval", the plural form is "chevaux"
not "chevals". I doubt
Rails support a dictionnary for knowing the good plural form. Is there
way to change this
behavior ?
But, this is dangerous because in French, the plural form is not
constant ?
It's not constant in english either.
For sample a horse is called "cheval", the plural form is "chevaux"
not "chevals". I doubt
Rails support a dictionnary for knowing the good plural form. Is there
way to change this
behavior ?
Thank you, but can I override it ?, I don’t want to change the Rails code :
I try inside my controller to override it, but I can’t, the problem is that the activesupport cannot
be found ?
require ‘activesupport/inflections’
class CarnetController < ApplicationController
layout ‘carnet1’
Thank you, but can I override it ?, I don't want to change the Rails
code :
I try inside my controller to override it, but I can't, the problem
is that the activesupport cannot
be found ?
That's not the right place to do it. Depending on your version of
rails there's either an example at the bottom of environment.rb or in
config/initializers.
You'll probably want to clear out existing rules, which you can do
with clear