diff --git a/Gemfile.lock b/Gemfile.lock index b51e0a6a..5eb2a460 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -189,7 +189,6 @@ GEM jquery-rails (1.0.19) railties (~> 3.0) thor (~> 0.14) - jruby-pageant (1.0.2) json (1.7.3) json_spec (1.0.3) multi_json (~> 1.0) @@ -227,8 +226,7 @@ GEM multi_xml (0.5.1) net-scp (1.0.4) net-ssh (>= 1.99.1) - net-ssh (2.5.1) - jruby-pageant (>= 1.0.2) + net-ssh (2.5.2) nokogiri (1.5.2) orm_adapter (0.0.7) pickle (0.4.10) @@ -294,7 +292,7 @@ GEM rubyzip (0.9.8) sanitize (2.0.3) nokogiri (>= 1.4.4, < 1.6) - sass (3.1.18) + sass (3.1.19) sass-rails (3.2.5) railties (~> 3.2.0) sass (>= 3.1.10) diff --git a/app/controllers/locomotive/api/pages_controller.rb b/app/controllers/locomotive/api/pages_controller.rb index df7734d8..166a9eed 100644 --- a/app/controllers/locomotive/api/pages_controller.rb +++ b/app/controllers/locomotive/api/pages_controller.rb @@ -3,7 +3,7 @@ module Locomotive class PagesController < BaseController def index - @pages = current_site.pages.all + @pages = current_site.pages.order([:depth, :asc], [:position, :asc]) respond_with(@pages) end diff --git a/app/models/locomotive/extensions/page/tree.rb b/app/models/locomotive/extensions/page/tree.rb index 9edd58d3..0aaf950f 100644 --- a/app/models/locomotive/extensions/page/tree.rb +++ b/app/models/locomotive/extensions/page/tree.rb @@ -26,7 +26,7 @@ module Locomotive module ClassMethods - # Returns the pages tree from the site with the most minimal amount of queries. + # Returns the tree of pages from the site with the most minimal amount of queries. # This method should only be used for read-only purpose since # the mongodb returns the minimal set of required attributes to build # the tree.