Hi: I have a problem with the plural of fracancia, I got fragancium but in spanish is fragancia. I modified inflections in environment.rb Inflector.inflections do |i| i.irregular ''fragancia'', ''fragancias'' end but is ignored. The solution that I found was comment this inflection on inflections.rb #inflect.singular(/([ti])a$/i, ''\1um'') Any idea? thanks P -- Posted via http://www.ruby-forum.com/.
Pedro Visintin wrote:> Hi: > > I have a problem with the plural of fracancia, I got fragancium but in > spanish is fragancia. > > I modified inflections in environment.rb > > Inflector.inflections do |i| > i.irregular ''fragancia'', ''fragancias'' > end > > but is ignored.Did you restart your server after you made this change? The config is only loaded once, unlike application code. Assuming that fragancias is the plural of fragancia, your code should be working. If fragancia is the plural of fracanica, as you stated in your first sentence, you need to change your code. -- Ray
Ray Baxter wrote:> Pedro Visintin wrote: >> >> but is ignored. > > > Did you restart your server after you made this change? > > The config is only loaded once, unlike application code. > > Assuming that fragancias is the plural of fragancia, your code should be > working. > > If fragancia is the plural of fracanica, as you stated in your first > sentence, you need to change your code. > > -- > > RayRay: Im running through dispatch.rb via rewrite in .htaccess. I restarted apache, but still same error. Unknown column ''estilos_fragancias.fragancium_id Thanks P -- Posted via http://www.ruby-forum.com/.
> Ray: > > Im running through dispatch.rb via rewrite in .htaccess. > I restarted apache, but still same error. > > Unknown column ''estilos_fragancias.fragancium_id > > Thanks > > PI dont know if Inflector.inflections has effect on environment.rb. How can I check that? This issue starts when upgraded form rails 1.0 to 1.1.0 and 1.1.1. Is a bug of rails 1.1.x? Any Idea? thanks P -- Posted via http://www.ruby-forum.com/.
Pedro Visintin wrote:>>> but is ignored. >> >> Did you restart your server after you made this change? > > > Im running through dispatch.rb via rewrite in .htaccess. > I restarted apache, but still same error. > > Unknown column ''estilos_fragancias.fragancium_idI don''t know running via dispatch.rb. I would try running through webrick to verify that your inflection rule is working correctly and then work on the configuration issue. -- Ray
Ray Baxter wrote:> Pedro Visintin wrote: > >>>> but is ignored. >>> >>> Did you restart your server after you made this change? >> >> >> Im running through dispatch.rb via rewrite in .htaccess. >> I restarted apache, but still same error. >> >> Unknown column ''estilos_fragancias.fragancium_id > > I don''t know running via dispatch.rb. > > I would try running through webrick to verify that your inflection rule > is working correctly and then work on the configuration issue. > > -- > > RayRay: I cannot use webrick because I get Lost Connection to MySql during query. Im not root on server, is a shared hosting. So Im in trouble :-( Thanks P -- Posted via http://www.ruby-forum.com/.