module ActionDispatch::TestResponse::DeprecatedHelpers
def assigns
def assigns ActiveSupport::Deprecation.warn("response.assigns has been deprecated. Use controller.assigns instead", caller) @template.controller.assigns end
def binary_content
def binary_content ActiveSupport::Deprecation.warn("response.binary_content has been deprecated. Use response.body instead", caller) body end
def flash
def flash ActiveSupport::Deprecation.warn("response.flash has been deprecated. Use request.flash instead", caller) request.session['flash'] || {} end
def has_flash?
def has_flash? ActiveSupport::Deprecation.warn("response.has_flash? has been deprecated. Use flash.any? instead", caller) !flash.empty? end
def has_flash_object?(name=nil)
def has_flash_object?(name=nil) ActiveSupport::Deprecation.warn("response.has_flash_object? has been deprecated. Use flash[name] instead", caller) !flash[name].nil? end
def has_flash_with_contents?
def has_flash_with_contents? ActiveSupport::Deprecation.warn("response.has_flash_with_contents? has been deprecated. Use flash.any? instead", caller) !flash.empty? end
def has_session_object?(name=nil)
def has_session_object?(name=nil) ActiveSupport::Deprecation.warn("response.has_session_object? has been deprecated. Use session[name] instead", caller) !session[name].nil? end
def has_template_object?(name=nil)
def has_template_object?(name=nil) ActiveSupport::Deprecation.warn("response.has_template_object? has been deprecated. Use tempate.assigns[name].nil? instead", caller) !template_objects[name].nil? end
def layout
def layout ActiveSupport::Deprecation.warn("response.layout has been deprecated. Use template.layout instead", caller) @template.layout end
def redirect_url_match?(pattern)
def redirect_url_match?(pattern) ::ActiveSupport::Deprecation.warn("response.redirect_url_match? is deprecated. Use assert_match(/foo/, response.redirect_url) instead", caller) return false if redirect_url.nil? p = Regexp.new(pattern) if pattern.class == String p = pattern if pattern.class == Regexp return false if p.nil? p.match(redirect_url) != nil end
def redirected_to
def redirected_to ::ActiveSupport::Deprecation.warn("response.redirected_to is deprecated. Use response.redirect_url instead", caller) redirect_url end
def rendered
Returns the template of the file which was used to
def rendered ActiveSupport::Deprecation.warn("response.rendered has been deprecated. Use template.rendered instead", caller) @template.instance_variable_get(:@_rendered) end
def session
def session ActiveSupport::Deprecation.warn("response.session has been deprecated. Use request.session instead", caller) @request.session end
def template
def template ActiveSupport::Deprecation.warn("response.template has been deprecated. Use controller.template instead", caller) @template end
def template_objects
def template_objects ActiveSupport::Deprecation.warn("response.template_objects has been deprecated. Use template.assigns instead", caller) @template.assigns || {} end