classiccms 0.5.0 → 0.5.1
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.
- data/lib/classiccms/helpers.rb +3 -3
- data/lib/classiccms/version.rb +1 -1
- metadata +1 -1
data/lib/classiccms/helpers.rb
CHANGED
@@ -52,7 +52,7 @@ module Classiccms
|
|
52
52
|
|
53
53
|
#renders all child pages of the given position (id)
|
54
54
|
def section(section_name, parent_id = nil)
|
55
|
-
html =
|
55
|
+
html = {}
|
56
56
|
parent_id = get_parent_id(parent_id)
|
57
57
|
|
58
58
|
Base.where(:'connections.parent_id' => parent_id, :'connections.section' => section_name, :'connections.file'.ne => nil).each do |record|
|
@@ -61,9 +61,9 @@ module Classiccms
|
|
61
61
|
#render html
|
62
62
|
rendering = show connection.file, {views: ["app/views/#{record._type}", "app/views/#{record._type.downcase}"]}, {record: record}
|
63
63
|
|
64
|
-
html
|
64
|
+
html[connection.order_id] = rendering
|
65
65
|
end
|
66
|
-
html.join
|
66
|
+
Hash[html.sort].map{|k,v| v}.join
|
67
67
|
end
|
68
68
|
|
69
69
|
#returns the html for add button
|
data/lib/classiccms/version.rb
CHANGED