Hello!
This is my first post, so plz be patient
I discovered a strange bug in Rails 2.3.2:
Tested with various DB-Configs (SQLite 3 & MySQL)
Just create a new & fresh rails app and generate a scaffold like this:
ruby script/generate scaffold koerperpartie name:string
and run rake db:migrate and rake:test
â> there seems to be a problem with âkoerperpartie_pathâ
I can reproduce this error on others systems too.
btw âkoerperpartieâ means âbodypartâ
greetz
thomas jansing
On Jun 9, 11:08 pm, ThomasJ [email protected] wrote:
and run rake db:migrate and rake:test
â there seems to be a problem with âkoerperpartie_pathâ
Iâm guessing at what the problem is since I havenât tried this (tip
for next time: describe exactly what it is that didnât work), but my
money would be on rails incorrectly pluralizing/singularizing your non
english model name.
Fred
You got that right (of course) Fred
ârake routesâ
koerperparties GET /koerperparties(.:format)
{:action=>âindexâ, :controller=>âkoerperpartiesâ}
POST /koerperparties(.:format)
{:action=>âcreateâ, :controller=>âkoerperpartiesâ}
new_koerperparty GET /koerperparties/new(.:format)
{:action=>ânewâ, :controller=>âkoerperpartiesâ}
edit_koerperparty GET /koerperparties/:id/edit(.:format)
{:action=>âeditâ, :controller=>âkoerperpartiesâ}
koerperparty GET /koerperparties/:id(.:format)
{:action=>âshowâ, :controller=>âkoerperpartiesâ}
PUT /koerperparties/:id(.:format)
{:action=>âupdateâ, :controller=>âkoerperpartiesâ}
DELETE /koerperparties/:id(.:format)
{:action=>âdestroyâ, :controller=>âkoerperpartiesâ}
/:controller/:action/:id
/:controller/:action/:id(.:format)
Before issuing the âscript/generate scaffoldâŚâ command add this to
âconfig/initializers/inflections.rbâ:
ActiveSupport::Inflector.inflections do |inflect|
inflect.irregular âkoerperpartieâ, âkoerperpartiesâ # or whatever
the plural really is
end
Then âscript/generate scaffoldâŚâ and the following ârake
db:migrateâ, ârake testâ will make you smileâŚ
On Jun 9, 6:27 pm, Frederick C. [email protected]