polyblock 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/polyblock/block.rb +4 -1
- data/lib/polyblock/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 920f822fd193d80be7b5b15833339cd40e27deaf
|
4
|
+
data.tar.gz: 08a9857ae2e472dbf92ee1f2791c1465a9375222
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fa2f133a6b785071e22f5bd7dc5c7593d29cb0c095f1eb2a44c38fbe5845118296b2d88677da570e42aabc310ee806af1421c69aea379ff54f28624aa402c89
|
7
|
+
data.tar.gz: 94c81270f55be296de7c54772e9b03c9ba7e3fccc75f3c24731fa1d59ed90b8c7cea5af106e27aa21b013be5c4a2d2e6d669a19d87e21d377621fce617552539
|
@@ -41,7 +41,9 @@ module Polyblock
|
|
41
41
|
self.settings_cache = self.contentable.present? ? self.contentable.send("#{self.name}_settings") : DEFAULTS
|
42
42
|
end
|
43
43
|
|
44
|
-
def to_s
|
44
|
+
def to_s
|
45
|
+
return nil if self.content.nil?
|
46
|
+
self.class.strip_html(self.content) end
|
45
47
|
|
46
48
|
def present?
|
47
49
|
!nil? && content.present?
|
@@ -82,6 +84,7 @@ module Polyblock
|
|
82
84
|
end
|
83
85
|
|
84
86
|
def self.strip_html(str)
|
87
|
+
return str unless str.present?
|
85
88
|
output = str.gsub('<br><br>', '<br>').gsub(' ', ' ')
|
86
89
|
output = CGI.unescapeHTML(output)
|
87
90
|
output = ActionController::Base.helpers.strip_tags(output)
|
data/lib/polyblock/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polyblock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MacKinley Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|