Permalink
Browse files

Merge pull request #13 from wolfmanjm/master

Fixed deprecation warnings in Rails3
  • Loading branch information...
2 parents 83c4474 + 717e0d8 commit 609b9e37b0e753bb6fd3089f06b0293eb1d83211 @nodanaonlyzuul nodanaonlyzuul committed Nov 9, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/fixture_replacement/attribute_builder.rb
  2. +1 −1 lib/fixture_replacement/class_methods.rb
View
2 lib/fixture_replacement/attribute_builder.rb
@@ -47,7 +47,7 @@ def active_record_class
end
def instantiate(hash_to_merge = {}, instance = active_record_class.new)
- returning instance do
+ instance.tap do
instantiate_parent_fixture(instance)
call_attribute_body(instance, hash_to_merge)
add_given_keys(instance, hash_to_merge)
View
2 lib/fixture_replacement/class_methods.rb
@@ -17,7 +17,7 @@ def random_string(length=10)
end
def load_example_data
- load "#{rails_root}/db/example_data.rb"
+ load "#{::Rails.root.to_s}/db/example_data.rb"
rescue LoadError
# no-op. If the file is not found, don't panic
end

0 comments on commit 609b9e3

Please sign in to comment.