Skip to content

Commit

Permalink
Fixed Rails version check so it works with 3.2
Browse files Browse the repository at this point in the history
Closes jkrall#33
Closes jkrall#34
  • Loading branch information
jkrall committed Jan 22, 2012
1 parent e8d9efa commit 9de8957
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 =~ /^3\.1/ # Rails 3.1 lets us override views in engines
if ::Rails::VERSION.to_i >= 3.1 # 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 9de8957

Please sign in to comment.