norman/friendly_id — Issue #201: i18n naming conflict?
Author: kevinansfield
Created: 2011-12-20 12:42:49+00:00
State: open

Hi,

When using friendly_id (4.0.0.rc1) with a model, it brings in it's own I18n module, preventing direct access to Rails' top-level I18n module.

This has the effect that you can no longer call I18n.default_locale from within your model code, it results in the error:

```
undefined method `default_locale' for FriendlyId::I18n:Module
```

To work-around this you need to call it explicitly using your applications namespace, eg:

``` ruby
YourAppName::Application::I18n.default_locale
```

However this then results in warnings such as:

```
.../your_app_name/app/models/language.rb:70: warning: toplevel constant I18n referenced by YourAppName::Application::I18n
```