Skip to content

Commit

Permalink
Move render :nothing and :text => nil options to AC::Rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosantoniodasilva committed Jan 17, 2012
1 parent 562a12d commit 6244d16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
3 changes: 3 additions & 0 deletions actionpack/lib/abstract_controller/rendering.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ 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
Expand Down
10 changes: 0 additions & 10 deletions actionpack/lib/action_controller/metal/compatibility.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ class << self
]
end

def _normalize_options(options)
options[:text] = nil if options.delete(:nothing) == true
options[:text] = " " if options.key?(:text) && options[:text].nil?
super
end

def render_to_body(options)
super || " "
end
Expand All @@ -31,9 +25,5 @@ def _handle_method_missing
def method_for_action(action_name)
super || (respond_to?(:method_missing) && "_handle_method_missing")
end

def performed?
response_body
end
end
end

0 comments on commit 6244d16

Please sign in to comment.