polyblock 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/polyblock/application_helper.rb +5 -1
- data/lib/polyblock/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edd641d3a2ddf600f2cd7daf8f1df3a114011d02
|
4
|
+
data.tar.gz: 8dc664c26f64774d7fd5e43d903593f1ad7da709
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a100c4b0ae6c3164196dad65321b7db6531cf022631a35e8ab71ca38ac252b7f983517b4af791add2926365776bda1dd5c217255a8c1294e76c6af4aaa608825
|
7
|
+
data.tar.gz: c3d828b9025c876b5e2781ef8ac00cfb9a0ccc083c4696c33ef5d95eeb1e41e3dc7a7541fc1c65787ed57f43138105ca782db5313ab6c5c1189b9481117f1f5d
|
@@ -29,9 +29,13 @@ module Polyblock
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
+
# Generate a random string for id
|
33
|
+
o = [('a'..'z'), ('A'..'Z')].map { |i| i.to_a }.flatten
|
34
|
+
random_id = (0...50).map { o[rand(o.length)] }.join
|
35
|
+
|
32
36
|
# Build output tag
|
33
37
|
content = pb_exists ? pb.content : "<p>This block is content managed by Polyblock!<br />Click to edit me!</p>"
|
34
|
-
tag_options = options[:tag_options].deep_merge({:id => "pb-#{pb_id}", :data => {:pbid => pb_id, :pbname => name}})
|
38
|
+
tag_options = options[:tag_options].deep_merge({:id => "pb-#{pb_id}-#{random_id}", :data => {:pbid => pb_id, :pbname => name}})
|
35
39
|
tag_options[:contenteditable] = if options[:condensed]
|
36
40
|
"false"
|
37
41
|
elsif respond_to?(:can?) && can?(:manage, pb)
|
data/lib/polyblock/version.rb
CHANGED