Hello forum,
i currently try to learn ruby on rails. my first little project will be
a link blog.
i try to get the referer variable - but i don''t know to get it.
def index
@url = request.env["?"]
render :text => "The domain from which you come from is #{@url}"
end
Or do I should use the Net::HTTP?
-jens
--
Posted via http://www.ruby-forum.com/.
request.env[''HTTP_REFERER''] Mikkel Jens Krahe wrote:> Hello forum, > > i currently try to learn ruby on rails. my first little project will be > a link blog. > > i try to get the referer variable - but i don''t know to get it. > > def index > @url = request.env["?"] > render :text => "The domain from which you come from is #{@url}" > end > > Or do I should use the Net::HTTP? > > -jens-- Posted via http://www.ruby-forum.com/.