1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Forced newer versions of RedCloth to use hard breaks [DHH]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2436 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2005-10-02 20:21:43 +00:00
parent e19bd169fa
commit 810ebf7c6a
3 changed files with 12 additions and 3 deletions

View file

@ -1,5 +1,7 @@
*SVN*
* Forced newer versions of RedCloth to use hard breaks [DHH]
* Added new scriptaculous options for auto_complete_field #2343 [m.stienstra@fngtps.com]
* Don't prepend the asset host if the string is already a fully-qualified URL

View file

@ -82,7 +82,12 @@ module ActionView
# Returns the text with all the Textile codes turned into HTML-tags.
# <i>This method is only available if RedCloth can be required</i>.
def textilize(text)
text.blank? ? "" : RedCloth.new(text, [ :hard_breaks ]).to_html
if text.blank?
""
else
textilized = RedCloth.new(text, [ :hard_breaks ])
textilized.hard_breaks = true if textilized.respond_to?("hard_breaks=")
textilized.to_html
end
# Returns the text with all the Textile codes turned into HTML-tags, but without the regular bounding <p> tag.

View file

@ -3,11 +3,13 @@ module ActiveRecord
module DatabaseStatements
# Returns an array of record hashes with the column names as keys and
# column values as values.
def select_all(sql, name = nil) end
def select_all(sql, name = nil)
end
# Returns a record hash with the column names as keys and column values
# as values.
def select_one(sql, name = nil) end
def select_one(sql, name = nil)
end
# Returns a single value from a record
def select_value(sql, name = nil)