# Rails 2.0.1 breaks my app - simple question - can anyone help

**URL:** <https://www.ruby-forum.com/t/rails-2-0-1-breaks-my-app-simple-question-can-anyone-help/124996>\
**Category:** Rails\
**Created:** [January 4, 2008, 1:42pm UTC](https://www.ruby-forum.com/t/rails-2-0-1-breaks-my-app-simple-question-can-anyone-help/124996 "2008-01-04T13:42:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/838e76/32.png) [@rob](https://www.ruby-forum.com/u/rob)\
**Post date:** [January 4, 2008, 1:42pm UTC](https://www.ruby-forum.com/t/rails-2-0-1-breaks-my-app-simple-question-can-anyone-help/124996/1 "2008-01-04T13:42:10Z")

</div>

In rails 1.2.6 the following works fine:

class Promotion \< ActiveRecord::Base

def self.find\_by\_name(name)  
super(name.upcase.strip)  
end

end

so if the db contains a promotion with name ‘PROMO1’ then  
Promotion.find\_by\_name(‘pRoMo1’) \> a valid promotion

in rails 2.0.1 Promotion.find\_by\_name(‘pRoMo1’) \> nil

I guess I can’t override the default find\_by\_xxx methods in rails 2 -  
but why? Should I not be doing this? I haven’t spotted anything in  
the release notes.

Any insight appreciated.
