スクルト神守 wrote:
> hello Martin, Please forgive my terrible english.
> 
> I tried your mokye patch,
> but it didn't work well.

Yes, I just found out myself the patch is only a partial solution: it 
worked on my simple prototype, but once integrated into my production 
system, it stopped working. Like you, I found that "load session" was 
happening before "set option".

The problem is that the session is automatically loaded as soon as 
something tries to use it. So if some plugin uses the session before 
your controller gets control, then the session will be loaded before 
your  before_filter can set the options correctly.

What you can do to find the culprit: use the ruby debugger and add a 
"debugger" statement inside the load_session monkey patch function, then 
run your server with "script/server --debugger". When you try to access 
you site, your console will drop into the debugger, and you can issue a 
"where" command, that will give you a stack trace, so you can find out 
what triggered the call to load_session.

In my case, it was the render_component plugin.

Unfortunately, I do need the render_component plugin (for my admin pages 
that use ActiveScaffold)...


So, the problem is still open... Can anyone help? Should I fill a bug 
report?

--
Yves-Eric Martin
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to