Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #5832 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

[PATCH] Typo in cookies.rb comment.

Reported by: jessemerriman@warpmail.net Assigned to: David
Priority: low Milestone:
Component: ActionPack Version:
Severity: trivial Keywords:
Cc:

Description

Near the top of actionpack/lib/action_controller/cookies.rb is the following comment showing an example use of cookies:

# cookies[:login] = { :value => "XJ-122", :expires => Time.now + 360} # => Will set a cookie that expires in 1 hour

However, this is not correct. Time.now + 360 is 6 minutes from now, not 1 hour from now as it says. It should be Time.now + 3600. Minor, but it did trip me up for a second when I saw it in the documentation.

Attachments

cookies_example_fix.diff (0.6 kB) - added by jessemerriman@warpmail.net on 08/20/06 05:10:18.
Tiny comment typo fix.

Change History

08/20/06 05:10:18 changed by jessemerriman@warpmail.net

  • attachment cookies_example_fix.diff added.

Tiny comment typo fix.

08/20/06 05:28:47 changed by bitsweat

  • status changed from new to closed.
  • resolution set to fixed.

(In [4793]) Correct example in cookies docs. Closes #5832.