Sha256: 2ba9bb7aa546507638fe468ae54ca8379d1f36e26ab11da3a4d8342b583fdd3c

Contents?: true

Size: 729 Bytes

Versions: 5

Compression:

Stored size: 729 Bytes

Contents

require 'aslon_settings'
require 'rails'
require 'action_controller'
require 'application_helper'

module AslonSettings
  class Engine < Rails::Engine
     #raise
    # Config defaults
    config.widget_factory_name = "default factory name"
    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"
    end
    
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
aslon_settings-0.1.8 lib/engine.rb
aslon_settings-0.1.7 lib/engine.rb
aslon_settings-0.1.6 lib/engine.rb
aslon_settings-0.1.5 lib/engine.rb
aslon_settings-0.1.4 lib/engine.rb