Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit 810ebf7c6a2e9d02f76d8727e56c1706cc6ff66e 1 parent e19bd16
@dhh dhh authored
View
2  actionpack/CHANGELOG
@@ -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
7 actionpack/lib/action_view/helpers/text_helper.rb
@@ -82,7 +82,12 @@ def word_wrap(text, line_width = 80)
# 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
6 activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
@@ -3,11 +3,13 @@ module ConnectionAdapters # :nodoc:
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)
Please sign in to comment.
Something went wrong with that request. Please try again.