From b89cad4ec46fd34bbe278aff40472521a2434bd2 Mon Sep 17 00:00:00 2001 From: Godwin Date: Fri, 12 Aug 2016 08:33:44 -0700 Subject: [PATCH] Fixed robots.txt so that preview is not crawlable --- app/controllers/application_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 143641a..770a4f1 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -90,8 +90,7 @@ class ApplicationController < LinguaFrancaApplicationController end def robots - robot = is_production? && !is_test_server? ? 'live' : 'dev' - render :text => File.read("config/robots-#{robot}.txt"), :content_type => 'text/plain' + render :text => File.read("config/robots-#{Rails.env.production? ? 'live' : 'dev'}.txt"), :content_type => 'text/plain' end def humans