bootstrap-editable-rails 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,15 @@
1
- require "bootstrap-editable-rails/version"
1
+ require 'bootstrap-editable-rails/version'
2
+ require 'bootstrap-editable-rails/view_helper'
2
3
 
3
4
  module Bootstrap
4
5
  module Editable
5
6
  module Rails
6
7
  class Engine < ::Rails::Engine
8
+ initializer 'bootstrap-editable-rails' do
9
+ ::ActiveSupport.on_load(:action_view) do
10
+ ::ActionView::Base.send :include, Bootstrap::Editable::Rails::ViewHelper
11
+ end
12
+ end
7
13
  end
8
14
  end
9
15
  end
@@ -1,7 +1,7 @@
1
1
  module Bootstrap
2
2
  module Editable
3
3
  module Rails
4
- VERSION = "0.0.2"
4
+ VERSION = "0.0.3"
5
5
  end
6
6
  end
7
7
  end
@@ -0,0 +1,8 @@
1
+ module Bootstrap::Editable::Rails
2
+ module ViewHelper
3
+ # Returns +text+ transformed into HTML suitable for textarea input.
4
+ def textarea_format(text)
5
+ html_escape(text).gsub(/\r\n|\r|\n/, '<br>').html_safe
6
+ end
7
+ end
8
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap-editable-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-17 00:00:00.000000000 Z
12
+ date: 2012-12-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -42,6 +42,7 @@ files:
42
42
  - bootstrap-editable-rails.gemspec
43
43
  - lib/bootstrap-editable-rails.rb
44
44
  - lib/bootstrap-editable-rails/version.rb
45
+ - lib/bootstrap-editable-rails/view_helper.rb
45
46
  - vendor/assets/images/loading.gif
46
47
  - vendor/assets/javascripts/bootstrap-editable-inline.js
47
48
  - vendor/assets/javascripts/bootstrap-editable-inline.min.js
@@ -63,7 +64,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
63
64
  version: '0'
64
65
  segments:
65
66
  - 0
66
- hash: 929611822335875285
67
+ hash: -3845262202704862642
67
68
  required_rubygems_version: !ruby/object:Gem::Requirement
68
69
  none: false
69
70
  requirements:
@@ -72,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
73
  version: '0'
73
74
  segments:
74
75
  - 0
75
- hash: 929611822335875285
76
+ hash: -3845262202704862642
76
77
  requirements: []
77
78
  rubyforge_project:
78
79
  rubygems_version: 1.8.24