Sha256: d74e137cbb171c986ddfa18be45a56a638ae591cd15dd57c5b8d0e6ea4b10344

Contents?: true

Size: 337 Bytes

Versions: 43

Compression:

Stored size: 337 Bytes

Contents

module Spree
  module Api
    module Responders
      module RablTemplate
        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

43 entries across 43 versions & 1 rubygems

Version Path
solidus_api-2.5.2 lib/spree/api/responders/rabl_template.rb
solidus_api-2.5.1 lib/spree/api/responders/rabl_template.rb
solidus_api-2.5.0 lib/spree/api/responders/rabl_template.rb
solidus_api-2.5.0.rc1 lib/spree/api/responders/rabl_template.rb
solidus_api-2.5.0.beta2 lib/spree/api/responders/rabl_template.rb
solidus_api-2.5.0.beta1 lib/spree/api/responders/rabl_template.rb
solidus_api-2.4.2 lib/spree/api/responders/rabl_template.rb
solidus_api-2.4.1 lib/spree/api/responders/rabl_template.rb
solidus_api-2.3.1 lib/spree/api/responders/rabl_template.rb
solidus_api-2.2.2 lib/spree/api/responders/rabl_template.rb
solidus_api-2.1.1 lib/spree/api/responders/rabl_template.rb
solidus_api-2.0.3 lib/spree/api/responders/rabl_template.rb
solidus_api-1.4.2 lib/spree/api/responders/rabl_template.rb
solidus_api-1.3.2 lib/spree/api/responders/rabl_template.rb
solidus_api-2.4.0 lib/spree/api/responders/rabl_template.rb
solidus_api-2.4.0.rc1 lib/spree/api/responders/rabl_template.rb
solidus_api-2.4.0.beta1 lib/spree/api/responders/rabl_template.rb
solidus_api-2.3.0 lib/spree/api/responders/rabl_template.rb
solidus_api-2.3.0.rc3 lib/spree/api/responders/rabl_template.rb
solidus_api-2.3.0.rc2 lib/spree/api/responders/rabl_template.rb