On Thu, Sep 3, 2009 at 5:25 PM, Frederick Cheung<[email protected]> wrote: > > > On Sep 3, 6:47 pm, zambezi <[email protected]> wrote: >> >> Frustrations aside I feel much better because you were spot on, Rick >> D. Responder is a model and qualifying the name resolved the >> problem. >> >> I'm still unclear as to why there was a "name clash" since there is >> only one class named Responder whether this namespace or elsewhere. >> But I greatly appreciate all of the the guidance, help and patience >> from both Ricks'. A little piece of my sanity is in debt to you. > > No, there is a Responder class that is part of Rails, and ruby's > constant lookup rules made it find the one that is hidden inside > ActionController before it found your top level one
And how did I figure that out, the OP might ask. Look at the walkback: You have a nil object when you didn't expect it! The error occurred while evaluating nil.request RAILS_ROOT: C:/RubyRails/rails_apps/rappEAH C:/RubyRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/mime_responds.rb:114:in `initialize' app/controllers/incident_controller.rb:19:in `new' app/controllers/incident_controller.rb:19:in `signup' The actual error happened in the file action_controller/mime_responds.rb which raised my suspicions. So I looked at the source code, which is in the actionpack gem (the one which has the code for action_controller and action_view, and le voila! -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

