Permalink
Browse files

Fixed the Rails version check.

  • Loading branch information...
1 parent 298044c commit e0a21dd6c4b5a7cd7814cd18c9b5864185558ab2 @nirvdrum nirvdrum committed Jan 24, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/analytical/api.rb
View
@@ -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

0 comments on commit e0a21dd

Please sign in to comment.