query_report 1.0.20 → 1.0.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/query_report/record.rb +6 -1
- data/lib/query_report/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: 9c8c81573f3c058802d4e0f5c79b1ac71e86df64
|
4
|
+
data.tar.gz: 703e69202bc42844c1a87445cdb61e832936c309
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e1aa0d0d9609ec2d46087ddadea6be908da1b6c11847286e8cb02b500c308381f08172fd09bc268f47acefa423f6ea593981785dcfb368e482f2336be64dc76
|
7
|
+
data.tar.gz: f05c03a9b18a4ce9554ddfa30cdd3eb2d7a9f1a605acaa048798d3955ab3a1b22b9684d28de72f5aa3a36099681de39e8329d488437acc1520dc43b78a23b6e2
|
data/lib/query_report/record.rb
CHANGED
@@ -38,11 +38,16 @@ module QueryReport
|
|
38
38
|
@columns = @columns.delete_if { |col| col.only_on_web? } unless render_from_view
|
39
39
|
|
40
40
|
query.map do |record|
|
41
|
-
array = @columns.collect { |column| [column.humanize,
|
41
|
+
array = @columns.collect { |column| [column.humanize, sanitize_value(column.value(record), render_from_view)] }
|
42
42
|
Hash[*array.flatten]
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
+
def sanitize_value(data, render_from_view)
|
47
|
+
data = strip_tags(data) if !render_from_view && data.present? && data.is_a?(String)
|
48
|
+
data
|
49
|
+
end
|
50
|
+
|
46
51
|
def has_any_rowspan?
|
47
52
|
@has_any_rowspan = @columns.any?(&:rowspan?) if @has_any_rowspan.nil?
|
48
53
|
@has_any_rowspan
|
data/lib/query_report/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: query_report
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- A.K.M. Ashrafuzzaman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|