Sha256: ed779304ae6d32a39bb489cc1f75b56c61f2a9ae056be28f5e2feeea01536ce2
Contents?: true
Size: 744 Bytes
Versions: 14
Compression:
Stored size: 744 Bytes
Contents
# frozen_string_literal: true module PagesCore class PagesPlugin < Plugin class << self def configure_localizations! unless @localizations_added I18n.load_path += Dir[ new.root.join("config", "locales", "**", "*.{rb,yml}") ] end @localizations_added = true end end paths["db/migrate"] = "db/migrate" admin_menu_item "News", proc { news_admin_pages_path(@locale) }, :pages, if: proc { Page.news_pages.any? }, current: proc { @page && @page.parent.try(&:news_page?) } admin_menu_item "Pages", proc { admin_pages_path(@locale) }, :pages admin_menu_item "Users", proc { admin_users_path }, :account end end
Version data entries
14 entries across 14 versions & 1 rubygems