# Modifying lib/active\_record/base.rb

**URL:** <https://www.ruby-forum.com/t/modifying-lib-active-record-base-rb/48208>\
**Category:** Rails\
**Created:** [November 17, 2005, 6:57pm UTC](https://www.ruby-forum.com/t/modifying-lib-active-record-base-rb/48208 "2005-11-17T18:57:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![christopher.k.hall](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/bbe5ce/32.png) [@christopher.k.hall](https://www.ruby-forum.com/u/christopher.k.hall)\
**Post date:** [November 17, 2005, 6:57pm UTC](https://www.ruby-forum.com/t/modifying-lib-active-record-base-rb/48208/1 "2005-11-17T18:57:46Z")

</div>

is there a process in place for how one would go about modifying AR  
base.rb?

I mean, I could modify the source file itself in but then that would  
result  
in all apps using the new code, so is there a way i can basically make a  
copy of base.rb to use in a single app for testing purposes?

also, is there a way to submit the changes to the rails developers?

thanks

Chris

---

<div class="post-metadata">

**Author:** ![christopher.k.hall](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/bbe5ce/32.png) [@christopher.k.hall](https://www.ruby-forum.com/u/christopher.k.hall)\
**Post date:** [November 17, 2005, 9:05pm UTC](https://www.ruby-forum.com/t/modifying-lib-active-record-base-rb/48208/2 "2005-11-17T21:05:04Z")

</div>

- Chris H. (removed\_email\_address@domain.invalid) [051117 13:00]:

> I mean, I could modify the source file itself in but then that would result in  
> all apps using the new code, so is there a way i can basically make a copy of  
> base.rb to use in a single app for testing purposes?

You would either want to put a rails checkout in vendor/ and mess with  
your local install, or do what we usually do (since Ruby is so darned  
dynamic) and simply override ActiveRecord methods (etc.) by reopening  
the appropriate classes and modules and redefining things on the fly.

> also, is there a way to submit the changes to the rails developers?

File a [PATCH] ticket at [http://dev.rubyonrails.com/](http://dev.rubyonrails.com/)

## Rick

[http://www.rickbradley.com](http://www.rickbradley.com) MUPRN: 641  
| standards compliant  
random email haiku | browsers than that never quite  
| seems to get it right.
