lib/anyway/rails/settings.rb in anyway_config-2.4.1 vs lib/anyway/rails/settings.rb in anyway_config-2.4.2
- old
+ new
@@ -64,19 +64,20 @@
@autoload_via_zeitwerk = defined?(::Zeitwerk)
end
def current_environment
- ::Rails.env.to_s
+ @current_environment || ::Rails.env.to_s
end
def app_root
::Rails.root
end
end
self.default_config_path = ->(name) { ::Rails.root.join("config", "#{name}.yml") }
self.known_environments = %w[test development production]
+ self.use_local_files ||= ::Rails.env.development?
# Don't try read defaults when no key defined
self.default_environmental_key = nil
end
end