classiccms 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -60,12 +60,21 @@ module Classiccms
60
60
 
61
61
  #render html
62
62
  rendering = show connection.file, {views: ["app/views/#{record._type}", "app/views/#{record._type.downcase}"]}, {record: record}
63
-
64
- html[connection.order_id] = rendering
63
+ if html[connection.order_id] == nil
64
+ html[connection.order_id] = rendering
65
+ else
66
+ html[get_unique_number(html, connection.order_id)] = rendering
67
+ end
65
68
  end
66
69
  Hash[html.sort].map{|k,v| v}.join
67
70
  end
68
-
71
+ def get_unique_number(hash, number)
72
+ if hash[number] == nil
73
+ return number
74
+ else
75
+ return get_unique_number(hash, number+1)
76
+ end
77
+ end
69
78
  #returns the html for add button
70
79
  def add(*items)
71
80
  items.each do |item|
@@ -1,3 +1,3 @@
1
1
  module Classiccms #:nodoc
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: classiccms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: