Class Index [+]

Quicksearch

ActionDispatch::TestResponse::DeprecatedHelpers

Attributes

template[W]

Public Instance Methods

assigns() click to toggle source
    # File lib/action_dispatch/testing/test_response.rb, line 29
29:       def assigns
30:         ActiveSupport::Deprecation.warn("response.assigns has been deprecated. Use controller.assigns instead", caller)
31:         @template.controller.assigns
32:       end
binary_content() click to toggle source

Returns binary content (downloadable file), converted to a String

     # File lib/action_dispatch/testing/test_response.rb, line 103
103:       def binary_content
104:         ActiveSupport::Deprecation.warn("response.binary_content has been deprecated. Use response.body instead", caller)
105:         body
106:       end
flash() click to toggle source

A shortcut to the flash. Returns an empty hash if no session flash exists.

    # File lib/action_dispatch/testing/test_response.rb, line 61
61:       def flash
62:         ActiveSupport::Deprecation.warn("response.flash has been deprecated. Use request.flash instead", caller)
63:         request.session['flash'] || {}
64:       end
has_flash?() click to toggle source

Do we have a flash?

    # File lib/action_dispatch/testing/test_response.rb, line 67
67:       def has_flash?
68:         ActiveSupport::Deprecation.warn("response.has_flash? has been deprecated. Use flash.any? instead", caller)
69:         !flash.empty?
70:       end
has_flash_object?(name=nil) click to toggle source

Does the specified flash object exist?

    # File lib/action_dispatch/testing/test_response.rb, line 79
79:       def has_flash_object?(name=nil)
80:         ActiveSupport::Deprecation.warn("response.has_flash_object? has been deprecated. Use flash[name] instead", caller)
81:         !flash[name].nil?
82:       end
has_flash_with_contents?() click to toggle source

Do we have a flash that has contents?

    # File lib/action_dispatch/testing/test_response.rb, line 73
73:       def has_flash_with_contents?
74:         ActiveSupport::Deprecation.warn("response.has_flash_with_contents? has been deprecated. Use flash.any? instead", caller)
75:         !flash.empty?
76:       end
has_session_object?(name=nil) click to toggle source

Does the specified object exist in the session?

    # File lib/action_dispatch/testing/test_response.rb, line 85
85:       def has_session_object?(name=nil)
86:         ActiveSupport::Deprecation.warn("response.has_session_object? has been deprecated. Use session[name] instead", caller)
87:         !session[name].nil?
88:       end
has_template_object?(name=nil) click to toggle source

Does the specified template object exist?

     # File lib/action_dispatch/testing/test_response.rb, line 97
 97:       def has_template_object?(name=nil)
 98:         ActiveSupport::Deprecation.warn("response.has_template_object? has been deprecated. Use tempate.assigns[name].nil? instead", caller)
 99:         !template_objects[name].nil?
100:       end
layout() click to toggle source
    # File lib/action_dispatch/testing/test_response.rb, line 34
34:       def layout
35:         ActiveSupport::Deprecation.warn("response.layout has been deprecated. Use template.layout instead", caller)
36:         @template.layout
37:       end
redirect_url_match?(pattern) click to toggle source
    # File lib/action_dispatch/testing/test_response.rb, line 44
44:       def redirect_url_match?(pattern)
45:         ::ActiveSupport::Deprecation.warn("response.redirect_url_match? is deprecated. Use assert_match(/foo/, response.redirect_url) instead", caller)
46:         return false if redirect_url.nil?
47:         p = Regexp.new(pattern) if pattern.class == String
48:         p = pattern if pattern.class == Regexp
49:         return false if p.nil?
50:         p.match(redirect_url) != nil
51:       end
redirected_to() click to toggle source
    # File lib/action_dispatch/testing/test_response.rb, line 39
39:       def redirected_to
40:         ::ActiveSupport::Deprecation.warn("response.redirected_to is deprecated. Use response.redirect_url instead", caller)
41:         redirect_url
42:       end
rendered() click to toggle source

Returns the template of the file which was used to render this response (or nil)

    # File lib/action_dispatch/testing/test_response.rb, line 55
55:       def rendered
56:         ActiveSupport::Deprecation.warn("response.rendered has been deprecated. Use template.rendered instead", caller)
57:         @template.instance_variable_get(:@_rendered)
58:       end
session() click to toggle source
    # File lib/action_dispatch/testing/test_response.rb, line 24
24:       def session
25:         ActiveSupport::Deprecation.warn("response.session has been deprecated. Use request.session instead", caller)
26:         @request.session
27:       end
template() click to toggle source
    # File lib/action_dispatch/testing/test_response.rb, line 18
18:       def template
19:         ActiveSupport::Deprecation.warn("response.template has been deprecated. Use controller.template instead", caller)
20:         @template
21:       end
template_objects() click to toggle source

A shortcut to the template.assigns

    # File lib/action_dispatch/testing/test_response.rb, line 91
91:       def template_objects
92:         ActiveSupport::Deprecation.warn("response.template_objects has been deprecated. Use template.assigns instead", caller)
93:         @template.assigns || {}
94:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.