--- /dev/null
+module AssetHelper
+ def assets(directory)
+ assets = {}
+
+ Rails.application.assets.index.each_logical_path("#{directory}/*") do |path|
+ assets[path.sub(/^#{directory}\//, "")] = asset_path(path)
+ end
+
+ assets
+ end
+end
var id = iD()
.embed(true)
.assetPath("/assets/iD/") <%# Can't use asset_path('iD/') in production. %>
+ .assetMap(<%= assets("iD").to_json.html_safe %>)
.locale("<%= locale %>", "<%= asset_path("iD/locales/#{locale}.json") %>")
.preauth({
<% token = @user.access_token(ID_KEY) %>