activerecord-postgres_enum icon indicating copy to clipboard operation
activerecord-postgres_enum copied to clipboard

Symbols?

Open sam0x17 opened this issue 3 years ago • 3 comments

My expectation when using this gem was that the values would be automatically returned as symbols, however strings are used by default.

If I submit a pull request that adds the option to have enums be automatically returned as symbols, and make this option configurable and off by default, would that be reasonable, or are you against that line of thinking?

sam0x17 avatar Jan 12 '21 14:01 sam0x17

Hi! Sounds good!

bibendi avatar Jan 12 '21 18:01 bibendi

Could you give me a really high level brief description of where I could find the part of the code that needs to be changed? I've been poking around the project but haven't yet located the proper entrypoint for this.

If not that's fine -- I'll find it!!

On Tue, Jan 12, 2021 at 1:02 PM Misha Merkushin [email protected] wrote:

Hi! Sounds good!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bibendi/activerecord-postgres_enum/issues/41#issuecomment-758836014, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOE4LK3T7WC3VLURK3LP2DSZSFBZANCNFSM4V7IPV5Q .

sam0x17 avatar Jan 13 '21 22:01 sam0x17

I think it is here https://github.com/bibendi/activerecord-postgres_enum/blob/0a1848a3273d5e7d61afb8c22032840dd9019d8d/lib/active_record/postgres_enum/extensions.rb#L7-L14

I have no more guesses :)

bibendi avatar Jan 14 '21 06:01 bibendi