Sha256: 26304b6a915cb47fb5b3ad7db16a07ea01528e0af7a359470d05c475047dd7ee

Contents?: true

Size: 865 Bytes

Versions: 1

Compression:

Stored size: 865 Bytes

Contents

require 'spree_essentials'
require 'acts-as-taggable-on'

module SpreeEssentialBlog

  def self.tab
    { :label => "Posts", :route => :admin_posts }
  end
  
  def self.sub_tab
    [:posts, { :label => 'admin.subnav.posts', :match_path => '/posts' }]
  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", __FILE__) 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 :blog, SpreeEssentialBlog

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_essential_blog-0.1.0 lib/spree_essential_blog.rb