replace APP_CONFIG with proper one

This commit is contained in:
Alexander Stefanov-Khryukin 2015-11-09 14:03:24 +00:00
parent 133c3592f1
commit c7aff4d1e9
1 changed files with 1 additions and 1 deletions

View File

@ -1,4 +1,4 @@
APP_CONFIG = YAML.load_file("#{Rails.root}/config/application.yml")[Rails.env]
APP_CONFIG = Rails.application.config_for('application')
# Remove '/' from the end of url
APP_CONFIG.keys.select {|key| key =~ /_url\Z/}.each {|key| APP_CONFIG[key] = APP_CONFIG[key].chomp('/') if APP_CONFIG[key].respond_to?(:chomp)}
# Paginates a static array