提交 53596d09 编写于 作者: C Carlos Antonio da Silva

Refactor render nothing/text => nil logic, and move to right place

Options :nothing and :text => nil should be handled by
ActionController::Rendering instead.
上级 6244d16e
......@@ -165,9 +165,6 @@ def _normalize_options(options)
options[:prefixes] ||= _prefixes
end
options[:text] = nil if options.delete(:nothing) == true
options[:text] = " " if options.key?(:text) && options[:text].nil?
options[:template] ||= (options[:action] || action_name).to_s
options
end
......
......@@ -44,6 +44,10 @@ def _normalize_options(options) #:nodoc:
options[:text] = options[:text].to_text
end
if options.delete(:nothing) || (options.key?(:text) && options[:text].nil?)
options[:text] = " "
end
if options[:status]
options[:status] = Rack::Utils.status_code(options[:status])
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册