Sha256: 9d95fcd9a15eda4a87202fad931d942b25fe444686dc704af171b35a88d1d0f7

Contents?: true

Size: 544 Bytes

Versions: 3

Compression:

Stored size: 544 Bytes

Contents

require "rails/all"

module Jabe
  JABE_DIR = File.expand_path(File.join(__FILE__, '../../'))

  class Engine < Rails::Engine
    require File.join(JABE_DIR, 'app/helpers/jabe_helper.rb')

    initializer "static assets" do |app|
      if app.config.serve_static_assets
        app.middleware.insert_after ::ActionDispatch::Static, ::ActionDispatch::Static, "#{root}/public"
      end
    end

    initializer "jabe setup" do |app|
      ::ActionController::Base.send(:helper, :jabe)
    end

    def self.root
      JABE_DIR
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jabe-0.5.9 lib/jabe.rb
jabe-0.5.8 lib/jabe.rb
jabe-0.5.7 lib/jabe.rb