Sha256: 5c17ec31038627dc4c6bac85dd6edd3b91b567c262aa8cdaf3c723c84bd06401

Contents?: true

Size: 945 Bytes

Versions: 7

Compression:

Stored size: 945 Bytes

Contents

require 'muck-contents'
require 'rails'

module MuckContents
  class Engine < ::Rails::Engine
    
    def muck_name
      'muck-contents'
    end
    
    config.app_middleware.insert_before("ActionDispatch::ShowExceptions", "MuckContents::Routing::Rack")
    
    initializer 'muck-contents.helpers' do |app|
      ActiveSupport.on_load(:action_view) do
        include MuckContentsHelper
        include TinymceHelper
      end
    end
    
    initializer 'muck-contents.i18n' do |app|
      ActiveSupport.on_load(:i18n) do
        I18n.load_path += Dir[ File.join(File.dirname(__FILE__), '..', '..', 'config', 'locales', '*.{rb,yml}') ]
      end
    end
    
    initializer 'muck-contents.add_admin_ui_links', :after => 'muck-engine.add_admin_ui_links' do
      # Add admin link for contents
      MuckEngine.configuration.add_muck_admin_nav_item(I18n.translate('muck.engine.admin_content'), '/admin/contents')
    end
        
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
muck-contents-3.1.7 lib/muck-contents/engine.rb
muck-contents-3.1.6 lib/muck-contents/engine.rb
muck-contents-3.1.5 lib/muck-contents/engine.rb
muck-contents-3.1.4 lib/muck-contents/engine.rb
muck-contents-3.1.3 lib/muck-contents/engine.rb
muck-contents-3.1.2 lib/muck-contents/engine.rb
muck-contents-3.1.1 lib/muck-contents/engine.rb