On Sun, Feb 15, 2009 at 9:06 AM, MarkMT <[email protected]> wrote: > > I'm having trouble seeing what 'request' in this method definition > refers to. It appears to be an object of class Merb::Request, or a > method returning such an object (since the Request class defines a > 'session' method), but I haven't been able to find where that object > or method is defined. No doubt I'm missing something obvious, but it > has eluded me so far. Can someone tell me what that object refers to?
You got it. Merb::Request is a basic core class, and it's initialized at the very bottom of the Merb call stack -- in the "call" method of merb-core/rack/application.rb in fact. "call" is the generic method that Rack uses to invoke application code, and Merb::Request just takes the HTTP request data passed to it by Rack and puts some useful access methods around it. If you want to see this in action yourself, one easy way is to intentionally throw a runtime error into your Merb code (try misspelling "form_for" for instance, it's loads of fun) and then select the "All" checkbox in the stack trace. Then click errors and read the whole call stack to your heart's content. It's a fast-paced narrative, with lots of twists and turns. I won't give away the ending for you. (But if Kevin Spacey's in your app, it's a good bet he's the bad guy... Oops.) -- Have Fun, Steve Eley ([email protected]) ESCAPE POD - The Science Fiction Podcast Magazine http://www.escapepod.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" 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/merb?hl=en -~----------~----~----~----~------~----~------~--~---
