app/models/blocky/content_block.rb in blocky-0.0.9 vs app/models/blocky/content_block.rb in blocky-0.0.10
- old
+ new
@@ -1,10 +1,10 @@
module Blocky
class ContentBlock < ActiveRecord::Base
before_save :tidy_content
- scope :global, -> { where("page_path IS NULL") }
- scope :per_page, -> { where("page_path IS NOT NULL") }
+ scope :global, -> { where("page_path IS NULL").order(:name) }
+ scope :per_page, -> { where("page_path IS NOT NULL").order(:page_path) }
def global?
self.page_path.nil?
end