This project is archived and is in readonly mode.

#1611 ✓wontfix
João Paulo Freire

scaffold camelize before pluralize

Reported by João Paulo Freire | December 21st, 2008 @ 01:34 PM | in 2.x

Scaffold didn't created Migration class name correctly: it should be "CreateTiposDeProva" instead of "CreateTipoDeProvas" plural should have gone in the middle of the sentence.

my definitions:

ActiveSupport::Inflector.pluralize('tipo_de_prova').camelize

plural in the middle of sentence

ActiveSupport::Inflector.inflections do |inflect| inflect.irregular 'tipo_de_prova', 'tipos_de_prova' inflect.plural 'tipo_de_prova', 'tipos_de_prova' inflect.singular 'tipos_de_prova', 'tipo_de_prova' end

when checking migrations, only class name wasn't OK:

class CreateTipoDeProvas < ActiveRecord::Migration def self.up

create_table :tipos_de_prova do |t|

...

end

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages