Skip to content
This repository has been archived by the owner on Aug 10, 2020. It is now read-only.

Commit

Permalink
Merge pull request #35 from mogotest/master
Browse files Browse the repository at this point in the history
Fixed the Rails version check.
  • Loading branch information
jkrall committed Jan 24, 2012
2 parents 298044c + e0a21dd commit a4dd831
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/analytical/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a4dd831

Please sign in to comment.