@samTopicListItemSerializer is inherited class of ListableTopicSerializer. If I monkey patch ListableTopicSerializer it is not working on live version. Instead if I monkey patch TopicListItemSerializer it is working on both local and live. Weird
I just spent a long time debugging an issue caused by this. I was doing
add_to_serializer(:admin_user, :somefield)...
which worked fine in development, but not in production. Changing it to :admin_detailed_user fixed the problem (admin_detailed_user inherits from admin_user).
It would be good if we can either fix this, or at least add a warning. Differences between dev/prod are painful!
100% in agreement here if you can figure out any way to make this explode consistently on both prod and dev it would be awesome… My guess is that this is somehow related to the reloaders.
One sad thing about relying on “reload” magic is that there is a lot of magic. Its one big reason we moved away from using sprockets (and never jumped on the spring train) … it just got too hard to fit the mold of reloading without side effects.
(this could be not reload related, but hey, its a nice story )