On Sat, Apr 14, 2012 at 10:38, Dave Everitt <dever...@innotts.co.uk> wrote: > Haha! How did you get Spock on board... :-) > > I must admit I'm a little confused about the sytnax for environmental > variables, because as well as > @env[HTTP_REFERER] > this also works: > ENV['SCRIPT_NAME'] > > For a test I just used it like this: > ENV['SCRIPT_NAME'].scan(/\w+\.\w+$/) > to get the Camping file's name (with whatever file extension rb, rbx, > cgi) instead of using __FILE__
The only reason ENV['HTTP_REFERER'] works for you is that you deploy on (Fast)CGI. You should only depend on @env if you want your app to be compatible with other servers. _______________________________________________ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list