def render_association(association_data, options={})
      hash = {}

      if association_data.is_a?(Hash)
        association_data.each do |association, association_options|
          data = render_association(association, options.merge(:include => association_options))
          hash.merge!(data) if data
        end
      elsif association_data.is_a?(Array)
        association_data.each do |option|
          data = render_association(option)
          hash.merge!(data) if data
        end
      else
        if options[:preload]
          includes = options[:preload] == true ? options[:include] : options[:preload]
        end

        if (object = fetch_association(association_data, includes))
          data = ScopedSerializer.for(object, options.merge(:associations => options[:include])).as_json
          hash.merge!(data) if data
        end
      end

      hash
    end
def render_association(association_data, options={})
      hash = {}

      if association_data.is_a?(Hash)
        association_data.each do |association, association_options|
          data = render_association(association, options.merge(:include => association_options))
          hash.merge!(data) if data
        end
      elsif association_data.is_a?(Array)
        association_data.each do |option|
          data = render_association(option)
          hash.merge!(data) if data
        end
      else
        if options[:preload]
          includes = options[:preload] == true ? options[:include] : options[:preload]
        end

        if (object = fetch_association(association_data, includes))
          data = ScopedSerializer.for(object, options.merge(:associations => options[:include])).as_json
          hash.merge!(data) if data
        end
      end

      hash
    end
Renders a specific association.

 @return [Hash]

 @example
   render_association(:employee)
   render_association([:employee, :company])
   render_association({ :employee => :address })