builders.rb.patch

no builder for format - Pavel Rosick√Ĺ, 2017-08-17 01:26

Download (501 Bytes)

View differences:

builders.rb (working copy)
22 22
  module Views
23 23
    module Builders
24 24
      def self.for(format, request, response, &block)
25
        format ||= request.format.symbol.to_s unless request.nil?
25 26
        builder = case format
26 27
          when 'xml',  :xml;  Builders::Xml.new(request, response)
27 28
          when 'json', :json; Builders::Json.new(request, response)