Permalink
Browse files

Move render :nothing and :text => nil options to AC::Rendering

  • Loading branch information...
1 parent 562a12d commit 6244d16eaf8eea9ce963f08dced60399b121a6dc @carlosantoniodasilva carlosantoniodasilva committed Jan 15, 2012
@@ -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
@@ -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
@@ -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.