Forum: Ruby on Rails Inflections.rb in spanish

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Pedro V. (Guest)
on 2006-04-10 07:43
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
Ray B. (Guest)
on 2006-04-10 09:21
(Received via mailing list)
Pedro V. 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.

--

Ray
Pedro V. (Guest)
on 2006-04-10 15:46
Ray B. wrote:
> Pedro V. 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.
>
> --
>
> Ray

Ray:

Im running through dispatch.rb via rewrite in .htaccess.
 I restarted apache, but still same error.

Unknown column 'estilos_fragancias.fragancium_id

Thanks

P
Pedro V. (Guest)
on 2006-04-10 18:46
> Ray:
>
> Im running through dispatch.rb via rewrite in .htaccess.
>  I restarted apache, but still same error.
>
> Unknown column 'estilos_fragancias.fragancium_id
>
> Thanks
>
> P

I 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
Ray B. (Guest)
on 2006-04-10 18:48
(Received via mailing list)
Pedro V. 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.

--

Ray
Pedro V. (Guest)
on 2006-04-10 18:54
Ray B. wrote:
> Pedro V. 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.
>
> --
>
> Ray

Ray:

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
This topic is locked and can not be replied to.