Forum: Ruby on Rails Some of my code Broke after Upgrading from 0.13 to 0.14.3

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
rails (Guest)
on 2005-11-12 12:49
(Received via mailing list)
Some code has stopped working in my model as a result of upgrading to
rails rc4.

Two things stopped functioning properly in my model after my web-
hosts upgraded their rails environment:

1. There is a small percentage of phone numbers that are making it
past my before filter.  They are coming through with dashes. i.e.
'123-456-7890'  but when I attempt to recreate this the phone number
is normalized fine.  I'm unsure why 13 or 14 out of 116 new records
would pass by the fillter some how?

2. Prior to the upgrade I had redefined read attribute to format all
of the attributes to uppercase (thanks to help from people on this
list).  But now this code is no longer working :(  Any ideas?

Here is a condensed version of my model:
jeremy (Guest)
on 2005-11-14 06:12
(Received via mailing list)
Hash: SHA1

On Nov 10, 2005, at 11:47 AM, Jim Jeffers wrote:
> records would pass by the fillter some how?
> # Text transforms all strings to uppercase prior to display.
>    def read_attribute(attr_name)
>      a = super(attr_name)
>      if a.respond_to? 'upcase' then a.upcase else a end
>    end
> end

Does your code work when you remove the read_attribute override?

Try setting ActiveRecord::Base.generate_read_methods = false in

Version: GnuPG v1.4.2 (Darwin)

This topic is locked and can not be replied to.