WIP working on serving js in production
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
<head>
|
||||
<title><%= content_for?(:title) ? yield(:title) : (t :name) %></title>
|
||||
<%= stylesheet_link_tag "application", "forum-monster" %>
|
||||
<%= stylesheet_link_tag :application %>
|
||||
<%= csrf_meta_tag %>
|
||||
<%= javascript_include_tag(:application) %>
|
||||
<%= javascript_include_tag :application %>
|
||||
<%= yield(:head) %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -59,6 +59,8 @@ module Community
|
||||
# Version of your assets, change this if you want to expire all your assets
|
||||
config.assets.version = '1.0'
|
||||
|
||||
config.assets.precompile += ['*.css', '*.js']
|
||||
config.assets.initialize_on_precompile = false
|
||||
|
||||
config.assets.precompile += %w('*.css', '*.js')
|
||||
end
|
||||
end
|
||||
|
||||
@@ -14,17 +14,24 @@ Community::Application.configure do
|
||||
# Compress JavaScripts and CSS
|
||||
config.assets.compress = true
|
||||
|
||||
# Choose the compressors to use
|
||||
config.assets.js_compressor = :uglifier
|
||||
# config.assets.css_compressor = :yui
|
||||
|
||||
# Don't fallback to assets pipeline if a precompiled asset is missed
|
||||
config.assets.compile = false
|
||||
|
||||
# Generate digests for assets URLs
|
||||
config.assets.digest = true
|
||||
|
||||
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
||||
# config.assets.precompile += %w( )
|
||||
|
||||
# Defaults to nil and saved in location specified by config.assets.prefix
|
||||
# config.assets.manifest = YOUR_PATH
|
||||
|
||||
# Specifies the header that your server uses for sending files
|
||||
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
||||
config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
||||
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
||||
|
||||
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
||||
|
||||
Reference in New Issue
Block a user