On Dec 10, 2008, at 10:03 PM, makoto kuwata wrote:

>
> Hi,
>
> Invoking merb, I got warnings about constant definition in model
> classes:
>
>    $ merb -i
>    Loading init file from /Users/kwatch/myapp1/config/init.rb
>    Loading /Users/kwatch/myapp1/config/environments/development.rb
>     ~ Parent pid: 53711
>    /Users/kwatch/myapp1/app/models/person.rb:3: warning: already
> initialized constant GENDERS
>    /Users/kwatch/myapp1/app/models/person.rb:3: warning: already
> initialized constant GENDERS
>     ~ Compiling routes...
>    irb> exit

> Why merb (or ruby) reports warnings for constant definition?
> Merb loads model class files more than once?


Typical Ruby warning message. You can always do...

GENDERS = "male" unless defined? GENDERS

...if it really annoys you.

I believe its just Merb reloading your classes, for whatever reason.

:: Justin Reagor
:: [EMAIL PROTECTED]





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to