Skip to content

Commit

Permalink
Rename default_outvar to exclude_outvar
Browse files Browse the repository at this point in the history
  • Loading branch information
304 committed Jun 25, 2019
1 parent c174325 commit 6ebf9ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/sinatra/base.rb
Expand Up @@ -722,7 +722,7 @@ def liquid(template, options = {}, locals = {}, &block)
end

def markdown(template, options = {}, locals = {})
options[:default_outvar] = false
options[:exclude_outvar] = true
render :markdown, template, options, locals
end

Expand Down Expand Up @@ -819,11 +819,11 @@ def render(engine, data, options = {}, locals = {}, &block)
content_type = options.delete(:content_type) || content_type
layout_engine = options.delete(:layout_engine) || engine
scope = options.delete(:scope) || self
default_outvar = options.delete(:default_outvar) != false
exclude_outvar = options.delete(:exclude_outvar)
options.delete(:layout)

# set some defaults
options[:outvar] ||= '@_out_buf' if default_outvar
options[:outvar] ||= '@_out_buf' unless exclude_outvar
options[:default_encoding] ||= settings.default_encoding

# compile and render template
Expand Down

0 comments on commit 6ebf9ce

Please sign in to comment.