app/models/georgia/widget.rb in georgia-0.7.8 vs app/models/georgia/widget.rb in georgia-0.8.0

- old
+ new

@@ -6,12 +6,12 @@ has_many :ui_associations, dependent: :destroy has_many :ui_sections, through: :ui_associations has_many :revisions, through: :ui_associations has_many :pages, through: :revisions - scope :footer, joins(:ui_sections).where(georgia_ui_sections: {name: 'Footer'}).uniq - scope :submenu, joins(:ui_sections).where(georgia_ui_sections: {name: 'Submenu'}).uniq - scope :sidebar, joins(:ui_sections).where(georgia_ui_sections: {name: 'Sidebar'}).uniq + scope :footer, -> { joins(:ui_sections).where(georgia_ui_sections: {name: 'Footer'}).uniq } + scope :submenu, -> { joins(:ui_sections).where(georgia_ui_sections: {name: 'Submenu'}).uniq } + scope :sidebar, -> { joins(:ui_sections).where(georgia_ui_sections: {name: 'Sidebar'}).uniq } validate :content_presence def content_presence contents.each do |content| \ No newline at end of file