On Mon, 2009-10-05 at 00:39 -0700, Frederick Cheung wrote:
> 
> 
> On Oct 5, 4:52 am, Craig White <[email protected]> wrote:
> > On Sun, 2009-10-04 at 14:07 -0700, Craig White wrote:
> > > On Sun, 2009-10-04 at 12:50 -0700, Craig White wrote:
> 
> > ----
> > something changed in Rails 2.3.2 and @params and @env are good but
> > @session seems to be nil - even when there is an active session.
> >
> > If someone wants to toss me a bone here, I will adjust my code but for
> > now, I just commented out the @session section so I can move on.
> 
> Session handling was in large part rewritten for 2.3.2 - assumptions
> like there being an instance variable called @data  almost certainly
> no longer hold.
----
I don't know about 'assumptions' but I know that all of the previous
'how-to' error notification wikis primarily do this...

in a protected area of your application.rb
  def log_error(exception) 
    super(exception)
    begin
      ErrorMailer.deliver_snapshot(
        exception, 
        clean_backtrace(exception), 
        session.instance_variable_get("@data"), 
        params, 
        request.env)
    rescue => e
      logger.error(e)
    end
  end

so it appears that 
session.instance_variable_get("@data")

gets me nothing of value and I wanted the current session hash here, but
I don't know how to get this from the changed Rails.

Yes, this is definitely changed in Rails 2.3 and pretty much every error
notification I have found on the Internet now is broken.

Craig


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


--~--~---------~--~----~------------~-------~--~----~
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