Project

General

Profile

Feature #26709 » builders.rb.patch

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

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)
(1-1/3)