Sha256: 362daf06bb35b26d1a94c08752a13f5199eb7ae328483caf1f7a6ec55ed1942c

Contents?: true

Size: 372 Bytes

Versions: 66

Compression:

Stored size: 372 Bytes

Contents

# frozen_string_literal: true

module Spree
  module Api
    module Responders
      module JbuilderTemplate
        def to_format
          if template
            render template, status: options[:status] || 200
          else
            super
          end
        end

        def template
          options[:default_template]
        end
      end
    end
  end
end

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
solidus_api-4.4.1 lib/spree/api/responders/jbuilder_template.rb
solidus_api-4.4.0 lib/spree/api/responders/jbuilder_template.rb
solidus_api-4.3.4 lib/spree/api/responders/jbuilder_template.rb
solidus_api-4.2.4 lib/spree/api/responders/jbuilder_template.rb
solidus_api-4.1.5 lib/spree/api/responders/jbuilder_template.rb
solidus_api-4.3.3 lib/spree/api/responders/jbuilder_template.rb
solidus_api-4.3.2 lib/spree/api/responders/jbuilder_template.rb
solidus_api-4.1.4 lib/spree/api/responders/jbuilder_template.rb
solidus_api-4.3.1 lib/spree/api/responders/jbuilder_template.rb
solidus_api-4.3.0 lib/spree/api/responders/jbuilder_template.rb
solidus_api-4.2.3 lib/spree/api/responders/jbuilder_template.rb
solidus_api-4.1.3 lib/spree/api/responders/jbuilder_template.rb
solidus_api-4.0.4 lib/spree/api/responders/jbuilder_template.rb
solidus_api-3.4.6 lib/spree/api/responders/jbuilder_template.rb
solidus_api-4.0.3 lib/spree/api/responders/jbuilder_template.rb
solidus_api-4.1.2 lib/spree/api/responders/jbuilder_template.rb
solidus_api-4.2.2 lib/spree/api/responders/jbuilder_template.rb
solidus_api-3.4.5 lib/spree/api/responders/jbuilder_template.rb
solidus_api-4.2.1 lib/spree/api/responders/jbuilder_template.rb
solidus_api-4.2.0 lib/spree/api/responders/jbuilder_template.rb