classiccms 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.insert(connection.order_id, rendering)
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
@@ -1,3 +1,3 @@
1
1
  module Classiccms #:nodoc
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
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.0
4
+ version: 0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: