Hi,
I am getting the following error in WeBrick when using salted login
generator:
> ./script/../config/..//app/helpers/user_helper.rb:7: warning: already
> initialized constant DEFAULT_HEAD_OPTIONS
> 127.0.0.1 - - [31/May/2005:18:04:55 PDT] "HEAD /company.html
HTTP/1.0"
> 200 0
Now, I can easily get around this bug but i wondered how to prevent it
from happening. Because user_helper is a module / mixin, and in my
experience this bug happens only when the ''load'' command is
used I
think that rails must be issuing a load somewhere.
as in
load "user_helper"
(''require'' is supposedly fine)
I have checked my own application code and I am not explicitly issuing
''load'' for user_helper. Or require for that matter. I am not
explicitely referencing user_
So: Is it illegal to have constants in helpers? Or are we doing
something dumb? Generally, I can see that having constants in helpers
is not such a good idea... the semantics are just pretty unclear when
the mixin is used by different classes.
Thanks for any pointers
Nik
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails