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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 89cc1b54c98c9cccd0c5376b116d0a570c7377c1
4
- data.tar.gz: 6a272bab405dd0ab54bacbf77dc973c8da0d655a
3
+ metadata.gz: edd641d3a2ddf600f2cd7daf8f1df3a114011d02
4
+ data.tar.gz: 8dc664c26f64774d7fd5e43d903593f1ad7da709
5
5
  SHA512:
6
- metadata.gz: 7a9ea4724e71b8c0e50f02f4045395ce2ee9623ba4b65aaf40296512b81eef79f4f7002129c49fc79859a8f94b94e7f1bc4809594f9eb5143e588d5fdef0cdc2
7
- data.tar.gz: 8d96190c8c82683a1658fd42768abc166caf29c1edbd10ab5c72188a9e1f7e24ffd1d13f92ee2d32af8196611fbc0060470a15b0e62f919b32266e6fc742f5da
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)
@@ -1,3 +1,3 @@
1
1
  module Polyblock
2
- VERSION = "0.3.6"
2
+ VERSION = "0.3.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polyblock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - MacKinley Smith