Permalink
Browse files

trying to make the deprecation warning more helpful. fixes #153

  • Loading branch information...
1 parent e598e0e commit 443b7cb563ffcfbd621235a244afffd4e067e4d9 @tenderlove tenderlove committed Mar 28, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/mysql2.rb
View
@@ -16,6 +16,9 @@ module Mysql2
end
if defined?(ActiveRecord::VERSION::STRING) && ActiveRecord::VERSION::STRING < "3.1"
- puts "WARNING: This version of mysql2 (#{Mysql2::VERSION}) doesn't ship with the ActiveRecord adapter bundled anymore as it's now part of Rails 3.1"
- puts "WARNING: Please use the 0.2.x releases if you plan on using it in Rails <= 3.0.x"
+ warn "============= WARNING FROM mysql2 ============="
+ warn "This version of mysql2 (#{Mysql2::VERSION}) doesn't ship with the ActiveRecord adapter."
+ warn "In Rails version 3.1.0 and up, the mysql2 ActiveRecord adapter is included with rails."
+ warn "If you want to use the mysql2 gem with Rails <= 3.0.x, please use the latest mysql2 in the 0.2.x series".
+ warn "============= END WARNING FROM mysql2 ============="
end

0 comments on commit 443b7cb

Please sign in to comment.