Permalink
Browse files

Rails.version on rails 4

  • Loading branch information...
1 parent 7d6f456 commit 6f70fb160beb86203de4a580c26d2b4ef819d4b6 @arthurnn arthurnn committed Apr 1, 2013
Showing with 4 additions and 5 deletions.
  1. +4 −5 lib/rpm_contrib.rb
View
@@ -14,7 +14,7 @@ module RPMContrib; end
if defined? Rails
# Rails 3.x+
- if Rails.respond_to?(:version) && Rails.version =~ /^(3|4)/
+ if Rails.respond_to?(:version) && Rails.version.to_s =~ /^(3|4)/
module NewRelic
class Railtie < Rails::Railtie
initializer("rpm_contrib.start_plugin"){ NewRelic::Control.instance.init_plugin }
@@ -27,10 +27,9 @@ class Railtie < Rails::Railtie
raise "The rpm_contrib gem supports Rails 2.2+ only."
end
else
- # If not running Rails, it is important that you load the contrib gem as late
- # as possible so the agent initializes after everything else. Either that
+ # If not running Rails, it is important that you load the contrib gem as late
+ # as possible so the agent initializes after everything else. Either that
# or make the following call yourself at the end of your startup sequence
# (it is idempotent).
- NewRelic::Control.instance.init_plugin
+ NewRelic::Control.instance.init_plugin
end
-

0 comments on commit 6f70fb1

Please sign in to comment.