Hi all,
I''ve noticed that although the API docs show the use of strings as keys
for session and flash, I think that the use of symbols is more natural.
e.g:
@session[:user] = some_user
flash[:error] = "Message"
instead of
@session["user"] = some_user
flash["error"] = "Message"
However, in the session method, if you happen to mix them up, you''re in
trouble:
@session["user"] != @session[:user]
Apparently, for flash (and @params!) these ARE equivalent.
Which brings me to my questions:
1. Would it not be practical/easier/more intuitive if for the session
object, strings and symbol keys would be equivalent too, or are there
practical reasons it works as it does?
2. Does everybody else just use strings as @session keys right now?
I don''t want to have to remember which one to use for each case, so
if most libraries / rails extensions use strings, I guess I should
stick with that too, to avoid confusion.
Joost Diepenmaat.