Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

This project is archived and is in readonly mode.

ActionView::Helpers::TextHelper#truncate unclear documentation

#3016

#2899 [PATCH] Rails 2.1.0 ActionView::Helpers::TextHelper#truncate has brought to light that while the intention of truncate is meant to return a total character length of :length that the examples provided don't always demonstrate it.

Reported by Steve St. Martin · August 8th, 2009 @ 11:46 PM

State: committed
Milestone: 2.3.4
Assigned to: Jeremy Kemper Jeremy Kemper
Importance: none

Activity

  1. Steve St. Martin
    Steve St. Martin
    • Tag changed from 2, 2.3.x, 3.0, bugmash, text_helper to 2, 2.3.x, 3.0, bugmash, text_helper

    I've attached a patch to update documentation for 2-3-stable

    August 8th, 2009 @ 11:47 PM

  2. Steve St. Martin
  3. Jeremy Kemper
    Jeremy Kemper
    • Assigned user set to Jeremy Kemper
    • State changed from new to open
    • Milestone set to 2.3.4

    August 9th, 2009 @ 12:18 AM

  4. Matt Duncan
    Matt Duncan

    In the patch for master, there is an extra space at the end of the following line:

    # for a total length not exceeding <tt>:length</tt>.
    

    That said, excellent patch.

    +1

    August 9th, 2009 @ 12:28 AM

  5. Steve St. Martin
    Steve St. Martin

    patch updated to remove trailing whitespace for those it matters to :P, still works against master too

    August 9th, 2009 @ 01:00 AM

  6. Jeremy Kemper
    Jeremy Kemper
    • State changed from open to committed

    2-3-stable: 679a0bf17fa9d74a4475753e9075bed8aea59e9a

    master: 618771beb57e623e05f70fd31f3bdb0c04318017

    August 9th, 2009 @ 01:17 AM

  7. Jeremy Kemper
    Jeremy Kemper
    • Tag changed from 2, 2.3.x, 3.0, bugmash, text_helper to 2, 2.3.x, 3.0, text_helper

    August 9th, 2009 @ 01:17 AM

  8. Repository
  9. Repository
  10. Andrea Campi
    Andrea Campi
    • Tag changed from 2, 2.3.x, 3.0, text_helper to 2-3-stable, 2.3.x, 3.0, text_helper
    • Importance changed from to

    October 16th, 2010 @ 11:44 PM