0
- # A shortcut to the flash. Returns an emp
yt hash if no session flash exists.
0
+ # A shortcut to the flash. Returns an emp
ty hash if no session flash exists.
0
+ # Returns true if the flash is not empty, otherwise false.
0
+ # assert @response.has_flash?
0
!session['flash'].empty?
0
- #
Do we have a flash that has contents?0
+ #
Currently identical to <tt>has_flash?</tt>.0
def has_flash_with_contents?
0
- # Does the specified flash object exist?
0
+ # Returns true if the key +name+ of the flash hash does not return a nil value.
0
+ # flash[:transient_data] = 'Something'
0
+ # assert @response.has_flash_object?(:transient_data)
0
def has_flash_object?(name=nil)
0
# Does the specified object exist in the session?
0
def has_session_object?(name=nil)
0
# Returns the response cookies, converted to a Hash of (name => CGI::Cookie) pairs
0
- # assert_equal ['AuthorOfNewPage'],
r.cookies['author'].value
0
+ # assert_equal ['AuthorOfNewPage'],
@response.cookies['author'].value
0
headers['cookie'].inject({}) { |hash, cookie| hash[cookie.name] = cookie; hash }
0
get(@response.redirected_to.delete(:action), @response.redirected_to.stringify_keys)
0
+ # Instance variables assigned in the action that are available for the view can
0
+ # be accessed throught this method using the +key+ as the index to the assigns hash.
0
+ # assert_not_nil assigns(:person)
0
@response.template.assigns
0
@response.template.assigns[key.to_s]
0
+ # Shortcut for @response.session
0
+ # Shortcut for @response.flash
0
+ # Shortcut for @response.cookies
0
+ # Shortcut for @response.redirect_url
Comments
No one has commented yet.