Permalink
Browse files

Merge pull request #13734 from tjschuck/fixture_class_name_deprecatio…

…n_warning

Update fixture class name deprecation warning to give more information about caller
  • Loading branch information...
2 parents 44c51fc + e47203d commit c253b8e43b5bbf574eab7805340c6ea0bbc4cdf3 @carlosantoniodasilva carlosantoniodasilva committed Jan 16, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/fixtures.rb
@@ -462,7 +462,7 @@ def initialize(class_names, config)
@class_names.delete_if { |k,klass|
unless klass.is_a? Class
klass = klass.safe_constantize
- ActiveSupport::Deprecation.warn("The ability to pass in strings as a class name will be removed in Rails 4.2, consider using the class itself instead.")
+ ActiveSupport::Deprecation.warn("The ability to pass in strings as a class name to `set_fixture_class` will be removed in Rails 4.2. Use the class itself instead.")
end
!insert_class(@class_names, k, klass)
}
@@ -568,7 +568,7 @@ def initialize(connection, name, class_name, path, config = ActiveRecord::Base)
@model_class = nil
if class_name.is_a?(String)
- ActiveSupport::Deprecation.warn("The ability to pass in strings as a class name will be removed in Rails 4.2, consider using the class itself instead.")
+ ActiveSupport::Deprecation.warn("The ability to pass in strings as a class name to `FixtureSet.new` will be removed in Rails 4.2. Use the class itself instead.")
end
if class_name.is_a?(Class) # TODO: Should be an AR::Base type class, or any?

0 comments on commit c253b8e

Please sign in to comment.