aboutsummaryrefslogtreecommitdiffstats
path: root/app/maps
diff options
context:
space:
mode:
authorMarc Florisson2012-09-06 10:31:07 +0200
committerMarc Florisson2012-09-06 10:31:07 +0200
commit09500773ee2bdb67719ffa0a6e529107a7cfc663 (patch)
tree73e0faa412f97f47ff8ee27486ba0e161d346735 /app/maps
parent3e36a149597bc152ca2387945d4db7c74c3395f7 (diff)
downloadchouette-core-09500773ee2bdb67719ffa0a6e529107a7cfc663.tar.bz2
fix relative_url_path
Diffstat (limited to 'app/maps')
-rw-r--r--app/maps/application_map.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/maps/application_map.rb b/app/maps/application_map.rb
index e103a06f5..fd7862186 100644
--- a/app/maps/application_map.rb
+++ b/app/maps/application_map.rb
@@ -110,11 +110,14 @@ class ApplicationMap
} } )
end
- def polymorphic_path_patch( source)
- config = Rails.application.config
- return source unless config.respond_to?(:relative_url_root)
+ def open_layer_path
+ relative_url_root = Rails.application.config.relative_url_root
+ return "openlayers/" unless relative_url_root
+ "#{relative_url_root}/openlayers/"
+ end
- relative_url_root = config.relative_url_root
+ def polymorphic_path_patch( source)
+ relative_url_root = Rails.application.config.relative_url_root
relative_url_root && !source.starts_with?("#{relative_url_root}/") ? "#{relative_url_root}#{source}" : source
end