I would like to initialize some session variables when the user visits
the app for the first time. Currently I do it in an application
before_filter (escaped if the session already exists), but that occurs
for each request, it’s dirty.
Do you have any better solution?
The solution you have seems like a fine answer to me. Simple,
standard, and should be pretty easy for any incoming developer to
understand. If youve got a method like the following then it probably
isn’t a big performance drain either.
return if session_stuff_is_already_set?