提交 4f3b5b8e 编写于 作者: S Santiago Pastorino

Fix indentation

上级 d3f87654
......@@ -20,36 +20,35 @@ def render(*args) #:nodoc:
private
# Normalize arguments by catching blocks and setting them on :update.
def _normalize_args(action=nil, options={}, &blk) #:nodoc:
options = super
options[:update] = blk if block_given?
options
end
# Normalize both text and status options.
def _normalize_options(options) #:nodoc:
if options.key?(:text) && options[:text].respond_to?(:to_text)
options[:text] = options[:text].to_text
end
# Normalize arguments by catching blocks and setting them on :update.
def _normalize_args(action=nil, options={}, &blk) #:nodoc:
options = super
options[:update] = blk if block_given?
options
end
if options[:status]
options[:status] = Rack::Utils.status_code(options[:status])
end
# Normalize both text and status options.
def _normalize_options(options) #:nodoc:
if options.key?(:text) && options[:text].respond_to?(:to_text)
options[:text] = options[:text].to_text
end
super
if options[:status]
options[:status] = Rack::Utils.status_code(options[:status])
end
# Process controller specific options, as status, content-type and location.
def _process_options(options) #:nodoc:
status, content_type, location = options.values_at(:status, :content_type, :location)
super
end
self.status = status if status
self.content_type = content_type if content_type
self.headers["Location"] = url_for(location) if location
# Process controller specific options, as status, content-type and location.
def _process_options(options) #:nodoc:
status, content_type, location = options.values_at(:status, :content_type, :location)
super
end
self.status = status if status
self.content_type = content_type if content_type
self.headers["Location"] = url_for(location) if location
super
end
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册