Sutto / rocket_pants

API building tools on top of ActionController. Also, an awesome name.
MIT License
981 stars 130 forks source link

SerializerWrapper doesnt call serializable_hash with options #58

Closed ekampf closed 11 years ago

ekampf commented 11 years ago

SerializerWrapper should call the serializer's serializable_hash with options the same way the code for regular objects in normalise_object does

ekampf commented 11 years ago

You can't tell wether you're in compact mode or not when using active record serializers... thats why you need to send options..

Sutto commented 11 years ago

@ekampf since this abides by the active model serializers api, the options are passed in to initialize - hence if you're using ActiveModel serializers, you can just use options[:compact] - part of the reason this uses that API (as they don't support options to serializable hash, we need to use a serializer wrapper).

Sutto commented 11 years ago

Closing since i hadn't heard back (and because of the AR-serializers options) - let me know if you have questions / want me to reopen.