I'm recording user IP addresses using request.remote_ip and it works
fine. Note that I'm doing it in a controller so I have access to the
request object--it wouldn't work from the console, unless maybe you
did some extra setup.


On Apr 26, 1:38 am, Brett <[email protected]> wrote:
> Hi all,
>
> I've built a simple Rails app that now works on Heroku (http://
> LetThemPlayHorse.com).
>
> I'm trying to record users' IP addresses to a SQL database using the
> following command from my "signatures" controller in the "create"
> action:
> @signature.ip_address = request.remote_ip
> where ip_address is a "char" type
>
> This works great on my local Mongrel server, but I get an error on
> Heroku -- the console tells me:
> NameError: undefined local variable or method `request'
>
> Do you have any advice or suggestions?
>
> Many thanks!
> Brett
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Heroku" 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 
> athttp://groups.google.com/group/heroku?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" 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/heroku?hl=en.

Reply via email to