Module: Interage::TextHelper

Included in:
ApplicationHelper
Defined in:
lib/interage/text_helper.rb

Instance Method Summary collapse

Instance Method Details

#nl2br(string, options = {}) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/interage/text_helper.rb', line 5

def nl2br(string, options = {})
  out = string.split("\n").map do |str|
     :div, str, options
  end

  safe_join out
end