Skip to content

Instantly share code, notes, and snippets.

@rabbitz
Forked from Amitesh/gist:1046269
Last active August 29, 2015 14:13
Show Gist options
  • Save rabbitz/b67377cb495b97030e9e to your computer and use it in GitHub Desktop.
Save rabbitz/b67377cb495b97030e9e to your computer and use it in GitHub Desktop.
require "rails"
module MyEngine
class Engine < Rails::Engine
# We can add all of the public assets from our engine and make them
# available to use. This allows us to use javascripts, images, stylesheets
# etc.
initializer "static assets" do |app|
app.middleware.insert_before(::ActionDispatch::Static, ::ActionDispatch::Static, "#{root}/public")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment