Sha256: bd1a1f8f1b8be960002b5ee021dfc8cb539b513d4af156f1d8c4115a544679b1

Contents?: true

Size: 705 Bytes

Versions: 5

Compression:

Stored size: 705 Bytes

Contents

require 'sofa_blog'
require 'rails'

module SofaBlog
  class Engine < Rails::Engine
    initializer 'sofa_blog.configuration' do |app|
      if defined?(ComfortableMexicanSofa)
        # Applying configuraion
        SofaBlog.configure do |conf|
          conf.admin_route_prefix = ComfortableMexicanSofa.config.admin_route_prefix
          conf.admin_controller = 'CmsAdmin::BaseController'
          conf.form_builder = 'ComfortableMexicanSofa::FormBuilder'
        end
        # Adding view hooks
        ComfortableMexicanSofa::ViewHooks.add(:navigation, '/sofa_blog/admin/navigation')
        ComfortableMexicanSofa::ViewHooks.add(:html_head, '/sofa_blog/admin/html_head')
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
comfy_blog-0.0.0 lib/comfy_blog/engine.rb
sofa_blog-0.1.3 lib/sofa_blog/engine.rb
sofa_blog-0.1.2 lib/sofa_blog/engine.rb
sofa_blog-0.1.1 lib/sofa_blog/engine.rb
sofa_blog-0.1.0 lib/sofa_blog/engine.rb