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

Ticket #2448 (closed defect: fixed)

Opened 3 years ago

Last modified 4 months ago

[PATCH] Add HTML options to #simple_format

Reported by: François Beausoleil <fbeausoleil@ftml.net> Assigned to: David
Priority: normal Milestone:
Component: ActionPack Version: edge
Severity: normal Keywords: verified
Cc: thechrisoshow

Description

The attached patch and tests add an HTML options argument to #simple_format, allowing styling to be added to formatted paragraphs.

simple_format("some text", :class => 'legalese')

formats as:

<p class="legalese">some text</p>

Patch against HEAD of trunk/.

Attachments

simple-format-html-options.patch (2.3 kB) - added by François Beausoleil <fbeausoleil@ftml.net> on 10/12/05 16:17:15.
Add html_options to #simple_format (tests & implementation)
simple_format_html_options.diff (2.3 kB) - added by thechrisoshow on 03/23/08 17:44:05.
Updated for r9082 (includes tests and docs)

Change History

10/12/05 16:17:15 changed by François Beausoleil <fbeausoleil@ftml.net>

  • attachment simple-format-html-options.patch added.

Add html_options to #simple_format (tests & implementation)

02/22/07 21:26:12 changed by josh

  • keywords changed from tag to tag needy.
  • version changed from 0.13.1 to edge.

Patch needs to be updated to work in edge rails.

03/23/08 17:44:05 changed by thechrisoshow

  • attachment simple_format_html_options.diff added.

Updated for r9082 (includes tests and docs)

03/23/08 17:58:04 changed by thechrisoshow

  • cc set to thechrisoshow.

03/23/08 18:51:31 changed by court3nay

nice work

+1

03/23/08 22:34:29 changed by cavalle

+1 Test pass

03/24/08 01:11:08 changed by keeran

+1 applied & tested

03/24/08 01:31:25 changed by thechrisoshow

  • keywords changed from tag needy to verified.

03/24/08 02:29:34 changed by rick

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

(In [9083]) Allow the #simple_format text_helper to take an html_options hash for each paragraph. Closes #2448 [Francois Beausoleil, thechrisoshow]