diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2012-04-25 18:33:36 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-04-25 18:33:36 +0530 |
commit | 4a3ce153f1e05c9c590e9ee74e818649336d929f (patch) | |
tree | 8552fc2e59d0217c43dba6cb376b111799ac2fa3 /actionpack/lib/action_view | |
parent | bb0906e2d7c283bccae3d903e9b19a83ca297811 (diff) | |
parent | 8189536aeb91394ccc649b9c14f0cf15c25b9423 (diff) | |
download | rails-4a3ce153f1e05c9c590e9ee74e818649336d929f.tar.gz rails-4a3ce153f1e05c9c590e9ee74e818649336d929f.tar.bz2 rails-4a3ce153f1e05c9c590e9ee74e818649336d929f.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/date_helper.rb | 3 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb index ffb1afa089..81f856feda 100644 --- a/actionpack/lib/action_view/helpers/date_helper.rb +++ b/actionpack/lib/action_view/helpers/date_helper.rb @@ -64,6 +64,9 @@ module ActionView # distance_of_time_in_words(to_time, from_time, true) # => about 6 years # distance_of_time_in_words(Time.now, Time.now) # => less than a minute # + # distance_of_time_in_words(70) # => 1 minute + # distance_of_time_in_words(60*60) # => about 1 hour + # def distance_of_time_in_words(from_time, to_time = 0, include_seconds = false, options = {}) from_time = from_time.to_time if from_time.respond_to?(:to_time) to_time = to_time.to_time if to_time.respond_to?(:to_time) diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index ad097f2eb7..8e7224937d 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -902,7 +902,7 @@ module ActionView # # Let's say that @post.validated? is 1: # check_box("post", "validated") # # => <input name="post[validated]" type="hidden" value="0" /> - # # <input type="checkbox" id="post_validated" name="post[validated]" value="1" /> + # # <input checked="checked" type="checkbox" id="post_validated" name="post[validated]" value="1" /> # # # Let's say that @puppy.gooddog is "no": # check_box("puppy", "gooddog", {}, "yes", "no") |