Module: Spree::Api::Responders::JbuilderTemplate

Included in:
AppResponder
Defined in:
lib/spree/api/responders/jbuilder_template.rb

Instance Method Summary collapse

Instance Method Details

#templateObject



15
16
17
# File 'lib/spree/api/responders/jbuilder_template.rb', line 15

def template
  options[:default_template]
end

#to_formatObject



7
8
9
10
11
12
13
# File 'lib/spree/api/responders/jbuilder_template.rb', line 7

def to_format
  if template
    render template, status: options[:status] || 200
  else
    super
  end
end