Sha256: 89275862448edfe45c4390255dfd7c2394efbad5e27e43a69c1e6b05d86b083a

Contents?: true

Size: 825 Bytes

Versions: 4

Compression:

Stored size: 825 Bytes

Contents

module Cas
  class Engine < ::Rails::Engine
    isolate_namespace Cas

    initializer :append_migrations do |app|
      unless app.root.to_s.match root.to_s
        config.paths["db/migrate"].expanded.each do |expanded_path|
          app.config.paths["db/migrate"] << expanded_path
        end
      end
    end

    config.after_initialize do
      Dir.glob("#{config.root}/app/uploaders/**/*.rb").each do |c|
        require_dependency(c)
      end
    end

    config.assets.precompile += ["cas/fileupload_manifest.js"]

    config.active_record.primary_key = :uuid
    config.generators do |g|
      g.test_framework :rspec
    end

    def self.mounted_path
      route = Rails.application.routes.routes.detect do |current_route|
        current_route.app == self
      end
      route && route.path
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cas-cms-0.1.3 lib/cas/engine.rb
cas-cms-0.1.2 lib/cas/engine.rb
cas-cms-0.1.1 lib/cas/engine.rb
cas-cms-0.1.0 lib/cas/engine.rb