Sha256: 51931fe1e429a33ec88e1edf1b791267901d594ae6582cdd5bae7066de87be58

Contents?: true

Size: 802 Bytes

Versions: 2

Compression:

Stored size: 802 Bytes

Contents

require 'spree_essentials'

module SpreeEssentialCms

  def self.tab
    { :label => "Pages", :route => :admin_pages }
  end
  
  def self.sub_tab
    [ :pages, { :match_path => '/pages' }]
  end
  
  class Engine < Rails::Engine
    
    config.autoload_paths += %W(#{config.root}/lib)    
    
    config.to_prepare do
      #loads application's model / class decorators
      Dir.glob File.expand_path("../../app/**/*_decorator*.rb") do |c|
        Rails.configuration.cache_classes ? require(c) : load(c)
      end

      #loads application's deface view overrides
      Dir.glob File.expand_path("../../app/overrides/*.rb", __FILE__) do |c|
        Rails.application.config.cache_classes ? require(c) : load(c)
      end
    end
    
  end
  
end

SpreeEssentials.register :cms, SpreeEssentialCms

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spree_essential_cms-0.2.1 lib/spree_essential_cms.rb
spree_essential_cms-0.2.0 lib/spree_essential_cms.rb