huacnlee / rails-settings-cached

Global settings for your Rails application.
Other
1.06k stars 202 forks source link

Add ability to define custom data types #235

Closed MrKirat closed 1 year ago

MrKirat commented 1 year ago

Hi!

Currently, the library supports only a limited number of types - array, hash, big_decimal, integer, float, string, boolean. I have a need to save custom types into a DB, so I decided to try to add the functionality that will allow me to do that. During implementation, I also tried to refactor a little bit of other code in order to make it more readable.

So here is what I've done so far:

Take note, that I was trying to keep us much backward compatibility as I can. At this moment it seems like all tests are being passed successfully.

Maintainers (@codez @berkos @huacnlee), could you please let me know whether it makes sense?

If yes, I will prepare the PR for the merge. If not - you are free to close it :)

huacnlee commented 1 year ago

Too many changes, please do not change code style.

MrKirat commented 1 year ago

@huacnlee I've pushed new changes only focused on the ability to add custom data types. Could you please check the changes again?

huacnlee commented 1 year ago

Great work!