awesome! thanks


On Thu, Apr 17, 2014 at 9:49 AM, Vikhyat Korrapati <notifications@github.com
> wrote:

> In app/controllers/application_controller.rb:
>
> > @@ -169,9 +169,9 @@ def guardian
> >    def serialize_data(obj, serializer, opts={})
> >      # If it's an array, apply the serializer as an each_serializer to the elements
> >      serializer_opts = {scope: guardian}.merge!(opts)
> > -    if obj.is_a?(Array) or obj.is_a?(ActiveRecord::Associations::CollectionProxy)
> > +    if obj.respond_to?(:to_ary)
>
> I just went through every occurrence of render_serialized and
> serialize_data, it is only called at the end of controller actions, never
> inside a loop. Also I just ran the discourse bench and performance numbers
> are the basically the same both before and after.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/discourse/discourse/pull/2270/files#r11713367>
> .
>