Sha256: 163dc57fb403a914d98360c92dbdc1e087fcbc95a0e805ae8e768d99ca35f71d

Contents?: true

Size: 713 Bytes

Versions: 14

Compression:

Stored size: 713 Bytes

Contents

require 'active_metadata'
require 'rails'
require 'action_controller'
require 'application_helper' 

module ActiveMetadata
  class Engine < Rails::Engine

    # Config defaults
    config.mount_at = '/'

    # Load rake tasks
    rake_tasks do
      load File.join(File.dirname(__FILE__), 'rails/railties/tasks.rake')
    end
    
    # Check the gem config
    initializer "check config" do |app|

      # make sure mount_at ends with trailing slash
      config.mount_at += '/'  unless config.mount_at.last == '/'
    end
    
    initializer "static assets" do |app|
      app.middleware.use ::ActionDispatch::Static, "#{root}/public"
      config.generators.orm = :active_record      
    end    
  end  
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
active_metadata-0.5.2 lib/engine.rb
active_metadata-0.5.1 lib/engine.rb
active_metadata-0.5.0 lib/engine.rb
active_metadata-0.4.2 lib/engine.rb
active_metadata-0.4.1 lib/engine.rb
active_metadata-0.3.2 lib/engine.rb
active_metadata-0.3.1 lib/engine.rb
active_metadata-0.3.0 lib/engine.rb
active_metadata-0.2.4 lib/engine.rb
active_metadata-0.2.3 lib/engine.rb
active_metadata-0.2.2 lib/engine.rb
active_metadata-0.2.1 lib/engine.rb
active_metadata-0.2.0 lib/engine.rb
active_metadata-0.1.9 lib/engine.rb