technoweenie / serialized_attributes

kind of a bridge between using AR and a full blown schema-free db
MIT License
61 stars 32 forks source link

use duplicable? so symbols are not duped #4

Closed mguterl closed 12 years ago

mguterl commented 13 years ago

For some reason Symbol responds to dup, but errors when it is called. Instead we can take advantage of Object#duplicable? from Rails which handles this correctly.

technoweenie commented 13 years ago

Is this a Rails 3 thing?

mguterl commented 13 years ago

Looks like it is around in Rails 2:

http://railsbrain.com/api/rails-2.3.2/doc/index.html?a=M000100&name=duplicable?

On Sun, Oct 2, 2011 at 9:42 AM, rick reply@reply.github.com wrote:

Is this a Rails 3 thing?

Reply to this email directly or view it on GitHub: https://github.com/technoweenie/serialized_attributes/pull/4#issuecomment-2262097

technoweenie commented 13 years ago

Looks like it is around in Rails 2:

http://railsbrain.com/api/rails-2.3.2/doc/index.html?a=M000100&name=duplicable?

Ah. We still use Rails 2.2. I'll have to back port it then.

mguterl commented 12 years ago

Hey @technoweenie I just added a backport of duplicable? directly to serialized_attributes. What do you think?