conred 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,20 +5,20 @@ module Conred
5
5
  module Helpers
6
6
 
7
7
  extend self
8
-
9
- @action_view = ActionView::Base.new
8
+ mattr_accessor :action_view
9
+ self.action_view = ActionView::Base.new
10
10
 
11
11
  def sanitize_and_trim(text, word_count = nil, omission = '...')
12
- text = @action_view.strip_tags(text)
12
+ text = action_view.strip_tags(text)
13
13
  if word_count
14
- @action_view.truncate(text, :length => word_count, :omission => omission)
14
+ action_view.truncate(text, :length => word_count, :omission => omission)
15
15
  else
16
16
  text
17
17
  end
18
18
  end
19
19
 
20
20
  def sanitize_body(text)
21
- text = @action_view.sanitize(text, :tags => %w(p a strong ul ol li blockquote strike u em), :attributes => %w(href))
21
+ text = action_view.sanitize(text, :tags => %w(p a strong ul ol li blockquote strike u em), :attributes => %w(href))
22
22
  text.html_safe
23
23
  end
24
24
 
@@ -1,3 +1,3 @@
1
1
  module Conred
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conred
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: