Hi,
I have the simplest rails app:
my only controller says:
class MaxmindController < ApplicationController
@ip = request
end
my index.rhtml in the views/maxmind folder says:
<%= debug @ip %>
the result of trying to view this in firefox is:
NameError in MaxmindController#index
undefined local variable or method `request’ for
MaxmindController:Class
if I remove the one line from my controller and change my view code
to:
<%= debug request %>
then i get my request object nicely displayed.
Why is request available only in the view and not in the controller?
I’m running this locally under locomotive.
Thanks,
Gabor