Sha256: 14e4f3c6d9bf9e1aff66f566ae5d9cfbdcd421e5a2b3f5a53cb958e1fe6e1d43

Contents?: true

Size: 1.33 KB

Versions: 13

Compression:

Stored size: 1.33 KB

Contents

require '<%= require_name %>'
require 'rails'

module <%= engine_module_name %>
  class Engine < Rails::Engine

    # Config defaults
# DEPRECATED
    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
    
    # consider the possibility to keep the modules in the lib directory, which is more compatible
    # with a normal gem/package
    paths["app/models"]           << "lib"
  end
end

# #In your Rails application into 
# # config/initializers
# # create a file called <%= require_name %>.rb
# # you can change the mount point of you engine, using option
# # --with_engine=namespace like http://YourDomain:port/YourMountPoint
# # Otherwise, if you want your RailsEngine to be called at root level, leave everything as it now, without that file.
# module <%= engine_module_name %>
#    class Engine < Rails::Engine
#      engine_name = '<%= engine_namespace %>'
#    end
# end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
bio-gem-1.3.6 lib/bio-gem/templates/engine
bio-gem-1.3.5 lib/bio-gem/templates/engine
bio-gem-1.3.4 lib/bio-gem/templates/engine
bio-gem-1.3.3 lib/bio-gem/templates/engine
bio-gem-1.3.2 lib/bio-gem/templates/engine
bio-gem-1.3.1 lib/bio-gem/templates/engine
bio-gem-1.3.0 lib/bio-gem/templates/engine
bio-gem-1.2.2 lib/bio-gem/templates/engine
bio-gem-1.2.1 lib/bio-gem/templates/engine
bio-gem-1.2.0 lib/bio-gem/templates/engine
bio-gem-1.1.2 lib/bio-gem/templates/engine
bio-gem-1.1.1 lib/bio-gem/templates/engine
bio-gem-1.1.0 lib/bio-gem/templates/engine