<% zoom = '12' %>
<% end %>
-<script type="text/javascript" src="/openlayers/OpenLayers.js"></script>
-<script type="text/javascript" src="/openlayers/OpenStreetMap.js"></script>
+<%= javascript_include_tag '/openlayers/OpenLayers.js' %>
+<%= javascript_include_tag '/openlayers/OpenStreetMap.js' %>
<%= javascript_include_tag 'map.js' %>
<script type="text/javascript">
<a href="http://wiki.openstreetmap.org/index.php/Editing">Several other options</a> are also available
for editing OpenStreetMap.
</div>
-<script type="text/javascript" src="/javascripts/swfobject.js"></script>
+<%= javascript_include_tag 'swfobject.js' %>
<script type="text/javascript">
var brokenContentSize = $("content").offsetWidth == 0;
var fo = new SWFObject("/potlatch/potlatch.swf?d="+Math.round(Math.random()*1000), "potlatch", "700", "600", "6", "#FFFFFF");
<% end %>
<% end %>
-<script type="text/javascript" src="/openlayers/OpenLayers.js"></script>
-<script type="text/javascript" src="/openlayers/OpenStreetMap.js"></script>
+<%= javascript_include_tag '/openlayers/OpenLayers.js' %>
+<%= javascript_include_tag '/openlayers/OpenStreetMap.js' %>
<%= javascript_include_tag 'map.js' %>
<% zoom = '12' %>
<% end %>
-<script type="text/javascript" src="/openlayers/OpenLayers.js"></script>
-<script type="text/javascript" src="/openlayers/OpenStreetMap.js"></script>
+<%= javascript_include_tag '/openlayers/OpenLayers.js' %>
+<%= javascript_include_tag '/openlayers/OpenStreetMap.js' %>
<%= javascript_include_tag 'map.js' %>
<script type="text/javascript">
# you don't control web/app server and can't set it the proper way
ENV['RAILS_ENV'] ||= 'production'
-# Don't add asset tags
-ENV["RAILS_ASSET_ID"] = ''
-
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '1.2.3'
# inflect.uncountable %w( fish sheep )
# end
+# Hack the AssetTagHelper to make asset tagging work better
+module ActionView
+ module Helpers
+ module AssetTagHelper
+ private
+ alias :old_compute_public_path :compute_public_path
+
+ def compute_public_path(source, dir, ext)
+ path = old_compute_public_path(source, dir, ext)
+ if path =~ /(.+)\?(\d+)\??$/
+ path = "#{$1}/#{$2}"
+ end
+ path
+ end
+ end
+ end
+end
+
# Set to :readonly to put the API in read-only mode or :offline to
# take it completely offline
API_STATUS = :online
"mod_cgi",
"mod_compress",
"mod_evasive",
+ "mod_expire",
"mod_fastcgi",
"mod_redirect",
"mod_status"
"text/plain"
)
+#
+# Set expiry for static content
+#
+expire.url = (
+ "/images/" => "access 10 years",
+ "/javascripts/" => "access 10 years",
+ "/openlayers/" => "access 10 years",
+ "/stylesheets/" => "access 10 years"
+)
+
#
# Cache compressed content
#