makandra / active_type

Make any Ruby object quack like ActiveRecord
MIT License
1.09k stars 74 forks source link

added option to specify `Fixnum` as a column value for static convers… #70

Closed sudoremo closed 7 years ago

sudoremo commented 7 years ago

The method attribute does not support Fixnum as column value. This PR now correctly handles this type. Many thanks for your consideration.

triskweline commented 7 years ago

I'm afraid we won't merge this :( It makes subtle changes to code that's already super complex, has no tests and is only relevant for a DB we can't support. We also want attributes to stay compatible with the Rails 5 attributes API, which uses symbols for the type. Sorry!

PS. There seems an error in the switch statement, since Fixnum.class is Class and thus matches all classes.