Sha256: e6a3b6826c62a7fe0962170d7886cc2160d39c511ede6b7bdfb6855e69267f84

Contents?: true

Size: 741 Bytes

Versions: 1

Compression:

Stored size: 741 Bytes

Contents

module Documentation
  class Engine < Rails::Engine
    
    isolate_namespace Documentation
    
    initializer 'shoppe.initialize' do |app|
      
      # config.paths["db/migrate"].expanded.each do |expanded_path|
      #   app.config.paths["db/migrate"] << expanded_path
      # end
      
      # Load view helpers for the base application
      ActiveSupport.on_load(:action_view) do
        ActionView::Base.send :include, Documentation::ViewHelpers
      end
    end
    
    generators do
      require 'documentation/generators/setup_generator'
    end
    
    def self.mounted_path
      if route = Rails.application.routes.routes.select { |r| r.app == self }.first
        route.path.spec.to_s
      end
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
local_documentation-1.0.0 lib/documentation/engine.rb