graph_starter 0.15.1 → 0.15.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf562575bad5f8bfbd744adfb51389266f72657c
|
4
|
+
data.tar.gz: 01dca4a00e774184bc30aaa2b91f9df559402d94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83e7ce8344e46f97b980e494349144e11a99a3365194145864ed483c8b3813fc949a92d04c392bafea111c699cdb8eaf0a47327e4c52690449f1fc15c2e6ca72
|
7
|
+
data.tar.gz: 3a0663eec5a1de5ff98ba85df910eac67a9fc6578152a3ba82c67572e03cf43387ab669aacc75370bbbf94fe4f8d3a8afa74ed96d1287dee3a9bb87121910ff7
|
@@ -149,11 +149,16 @@ module GraphStarter
|
|
149
149
|
end
|
150
150
|
|
151
151
|
def safe_title
|
152
|
+
self.class.sanitize_title(title)
|
153
|
+
end
|
154
|
+
|
155
|
+
def self.sanitize_title(title)
|
152
156
|
sanitizer = Rails::Html::WhiteListSanitizer.new
|
153
157
|
|
154
158
|
sanitizer.sanitize(title, tags: %w(b em i strong)).try(:html_safe)
|
155
159
|
end
|
156
160
|
|
161
|
+
|
157
162
|
def self.body_property(property_name = nil)
|
158
163
|
if property_name.nil?
|
159
164
|
@body_property
|
@@ -19,7 +19,7 @@
|
|
19
19
|
.item
|
20
20
|
= render partial: 'graph_starter/assets/icon', locals: {asset: category, image: (@category_images || {})[category.id]}
|
21
21
|
.content
|
22
|
-
= link_to category.
|
22
|
+
= link_to category.safe_title, asset_path(category)
|
23
23
|
- if categories.size > 2
|
24
24
|
.item
|
25
25
|
i.ellipsis.horizontal.large.icon
|
@@ -27,7 +27,7 @@
|
|
27
27
|
label = name.to_s.humanize
|
28
28
|
|
29
29
|
- field_name = (association.type == :has_many ? "#{name.to_s.singularize}_ids" : "#{name}_id")
|
30
|
-
- options = target_class.as(:n).pluck(target_class.name_property, target_class.id_property_name).sort_by {|pair| pair.inspect.downcase }
|
30
|
+
- options = target_class.as(:n).pluck(target_class.name_property, target_class.id_property_name).map {|title, _| [GraphStarter::Asset.sanitize_title(title), _] }.sort_by {|pair| pair.inspect.downcase }
|
31
31
|
|
32
32
|
- html_options = {class: 'ui fluid search dropdown'}
|
33
33
|
- html_options[:multiple] = '' if association.type == :has_many
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graph_starter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Underwood
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|