Rework application configuration
Use a preinitializer to load the settings from application.yml so that they are available as early as possible. All settings can also be overridden using environment variables. The ad-hoc settins in environment.rb are then moved to this new system so we have one consistent location for settings.
This commit is contained in:
parent
8b9cacd3c2
commit
f07819d81a
33 changed files with 100 additions and 99 deletions
|
@ -185,8 +185,8 @@ page << <<EOJ
|
|||
var projected = bounds.clone().transform(new OpenLayers.Projection("EPSG:900913"), new OpenLayers.Projection("EPSG:4326"));
|
||||
var size = projected.getWidth() * projected.getHeight();
|
||||
|
||||
if (size > #{APP_CONFIG['max_request_area']}) {
|
||||
setStatus(i18n("#{I18n.t('browse.start_rjs.unable_to_load_size', :max_bbox_size => APP_CONFIG['max_request_area'])}", { bbox_size: size }));
|
||||
if (size > #{MAX_REQUEST_AREA}) {
|
||||
setStatus(i18n("#{I18n.t('browse.start_rjs.unable_to_load_size', :max_bbox_size => MAX_REQUEST_AREA)}", { bbox_size: size }));
|
||||
} else {
|
||||
loadGML("/api/#{API_VERSION}/map?bbox=" + projected.toBBOX());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue