# FixtureReplacement overriding How to

**URL:** <https://www.ruby-forum.com/t/fixturereplacement-overriding-how-to/133193>\
**Category:** Rails\
**Created:** [March 28, 2008, 4:56pm UTC](https://www.ruby-forum.com/t/fixturereplacement-overriding-how-to/133193 "2008-03-28T16:56:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Reggie\_on\_rails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e56c9b/32.png) [@Reggie\_on\_rails](https://www.ruby-forum.com/u/Reggie_on_rails)\
**Post date:** [March 28, 2008, 4:56pm UTC](https://www.ruby-forum.com/t/fixturereplacement-overriding-how-to/133193/1 "2008-03-28T16:56:26Z")

</div>

Is anyone familiar with overriding the values for  
FixtureReplacement.defaults\_file

I’ve reviewed the rspec testcases. Changing the defaults\_file on  
first initial request fails; as it tries to load the default file  
first “#{rails\_root}/db/example\_data.rb”, the remaining request will  
initialize the defaults\_file correctly with no errors.

The easy approach would be to modify the file which contains the  
defaults\_file setting in FixtureReplacement.

Is this the rails way/best practices for overriding plugins.

Any ideas?

Thanks in advance

Reggie
