seed_dump icon indicating copy to clipboard operation
seed_dump copied to clipboard

support for HashWithIndifferentAccess field

Open edg3r opened this issue 10 years ago • 2 comments

If model had serialize :field, HashWithIndifferentAccess it was returned as a Hash, thus breaking model creation from seed dump

edg3r avatar Feb 02 '15 16:02 edg3r

@edg3r Thanks for the PR!

Ideally I'd like for SeedDump#value_to_s to not have a special return statement for ActiveSupport::HashWithIndifferentAccess. Would you mind modifying your PR so that SeedDump#value_to_s just consists of a single case...when...end block, with all of the existing when articles (e.g. BigDecimal, Range, else) calling #inspect on their return values?

Also, before merging I'd like for it to be covered by one or more specs. Feel free to update your PR with specs covering the functionality.

Feel free to do none, some, or all of my suggestions. I'll do whatever you don't do before merging the PR, though I'm pretty busy right now so no guarantees on when that will be.

rroblak avatar Apr 14 '15 04:04 rroblak

@rroblak Hey! I'm a little short on time too these days. But I'll try and add at least some of your suggestions in the near future

edg3r avatar Apr 16 '15 21:04 edg3r