Sha256: fc46253bf1a239f72c46762a3eebd955bdf847e8982f054afbcbf6ca3c7e3565
Contents?: true
Size: 731 Bytes
Versions: 33
Compression:
Stored size: 731 Bytes
Contents
module Spree module Api module Responders module RablTemplate def to_format if template render template, :status => options[:status] || 200 else super end rescue ActionView::MissingTemplate => e api_behavior(e) end def template request.headers['X-Spree-Template'] || controller.params[:template] || options[:default_template] end def api_behavior(error) if controller.params[:action] == "destroy" # Render a blank template super else # Do nothing and fallback to the default template end end end end end end
Version data entries
33 entries across 33 versions & 1 rubygems