danpal/attr_encryptor — Issue #1: Broken on Rails 2.3
Author: stouset
Created: 2012-01-25 14:40:38+00:00
State: open

https://github.com/danpal/attr_encryptor/blob/master/lib/attr_encryptor/adapters/active_record.rb#L17

This method will never get called. It's provided in a module, but because `attr_encryptor` is *already defined* in the class it extends, that method will take priority. Example:

```ruby
class Foo
def self.ponies
'ponies'
end
end

class Bar
def ponies
super + ' rock'
end
end

Foo.extend Bar

foo.ponies # => 'ponies'
```

Since the `Foo::ponies` method already exists, the one in `Bar` is never delegated to. This needs to be wrapped around the original via `alias_method_chain` or similar.