From e0a21dd6c4b5a7cd7814cd18c9b5864185558ab2 Mon Sep 17 00:00:00 2001 From: Kevin Menard Date: Mon, 23 Jan 2012 21:09:26 -0500 Subject: [PATCH] Fixed the Rails version check. --- lib/analytical/api.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/analytical/api.rb b/lib/analytical/api.rb index d92af6c..c9e59fe 100644 --- a/lib/analytical/api.rb +++ b/lib/analytical/api.rb @@ -73,7 +73,7 @@ def head_append_javascript ] if options[:javascript_helpers] - if ::Rails::VERSION::STRING.to_i >= 3.1 # Rails 3.1 lets us override views in engines + if Gem::Version.new(::Rails::VERSION::STRING) >= Gem::Version.new('3.1.0') # Rails 3.1 lets us override views in engines js << options[:controller].send(:render_to_string, :partial=>'analytical_javascript') if options[:controller] else # All other rails _partial_path = Pathname.new(__FILE__).dirname.join('..', '..', 'app/views/application', '_analytical_javascript.html.erb').to_s