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