Hello, I'm trying to override the way the json_serializer plugin serializes and deserializes a field.
I've looked through the source but I can't find any method of extension that would allow me to customize the plugin's behavior.
Can you just override the methods it makes?
And call super?
I've thought of overriding to_json and from_json, but I was wondering if there was a mechanism already available, especially a more granular one.
Alternatively, a third-party gem that provides this would be nice, but I've just scoured github and come up dry. I'm hoping to provide a simple, delcarative interface for this kind of tweaking, but I don't think it would be particularly hard to implement.
kevinward: what kind of changes are you looking to make?
In this particular case, I need to serialize date columns as integers and vice versa. This is absolutely pervasive in my project, so a general solution would be ideal.
I just looked at code and don't see anything (as you found as well)
so I guess wait for jeremyevans to chime in - or make a post to the Google group
Okay, thanks for your help. I'm working on my own implementation already so I may just follow up when I'm finished.
[13sequel] 15fnordfish commented on issue #1317: Short update/for the record: Sequel does throw a correct "LoadError" when the missing plugin cannot be loaded. However, Padrino loads the `database.rb` in it's "load dependencies"-run in which it catches LoadErrors (probably to cope with loading order issues) and just carries on.... 02https://git.io/vyw3O
does anyone know a profiling tool for sequel, like detecting stuff like N+1 queries on requests or integration tests?