On Jan 2, 2006, at 3:12 PM, Michael Koziarski wrote:

Is this happening for a reason?  It seems to me that Rails should be
a little more robust on its "minimum requirements" for a basic
controller and view to work properly.  I'd like to investigate
further, so I'm looking for a little feedback first.

Duane Johnson
(canadaduane)

There are several error conditions where rails does that 'blank
screen' stuff.   I try to fix them as I hit them.    I can't see a
valid reason for this behaviour, so perhaps investigate a patch for
it?


I'm not sure how to fix the blank screen I was getting due to having no DB connection; however, to fix the session restore blank screen mentioned by Ezra Z. line 102 of cgi_process.rb is the culprit in that case:

             [EMAIL PROTECTED] = CGI::Session.new(@cgi, session_options_with_string_keys)

When switching apps (usu. on a development machine where this is common) the session restore coughs and dies without a trace because models are not the same.  I think this has been discovered several times in a variety of ways (at least, I remember seeing some tickets on this).

In the CGI::Session rdocs it says, "If your application switches from one to the other without making sure that filenames will be different and clients still have old sessions lying around in cookies, then things will break nastily!"

So I'm wondering if we need to have a unique "application id" that gets stored in the session.  If such a thing existed, we could then test to make sure the session's APP ID matches the current APP ID.  Otherwise, bust an exception.

I think the best place to put the unique APP ID would be in the railties code so a UUID is created whenever a new rails app is generated.

Anyone have a better alternative?

Duane Johnson
(canadaduane)


_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to