Sha256: 8fdec4756d78ed829e73ad3c62849e7e4cb498bdd5e57b0041c12ba1572599c4

Contents?: true

Size: 235 Bytes

Versions: 7

Compression:

Stored size: 235 Bytes

Contents

module Bootstrap::Editable::Rails
  module ViewHelper
    # Returns +text+ transformed into HTML suitable for textarea input.
    def textarea_format(text)
      html_escape(text).gsub(/\r\n|\r|\n/, '<br>').html_safe
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bootstrap-editable-rails-0.0.9 lib/bootstrap-editable-rails/view_helper.rb
bootstrap-editable-rails-0.0.8 lib/bootstrap-editable-rails/view_helper.rb
bootstrap-editable-rails-0.0.7 lib/bootstrap-editable-rails/view_helper.rb
bootstrap-editable-rails-0.0.6 lib/bootstrap-editable-rails/view_helper.rb
bootstrap-editable-rails-0.0.5 lib/bootstrap-editable-rails/view_helper.rb
bootstrap-editable-rails-0.0.4 lib/bootstrap-editable-rails/view_helper.rb
bootstrap-editable-rails-0.0.3 lib/bootstrap-editable-rails/view_helper.rb