app/cms/scrivito/sdk_engine.rb in scrivito_sdk-1.15.0 vs app/cms/scrivito/sdk_engine.rb in scrivito_sdk-1.16.0.rc1
- old
+ new
@@ -1,11 +1,10 @@
require 'rails'
require 'jbuilder'
require 'jquery-rails'
require 'net/http/post/multipart'
-require_relative './legacy_switch'
require_relative './errors'
module ::Scrivito
class SdkEngine < Rails::Engine
def self.to_prepare
@@ -14,14 +13,10 @@
unless Rails.application.config.cache_classes
Scrivito.models.clear_cache
end
end
- if Scrivito::LegacySwitch.rails4?
- config.to_prepare { SdkEngine.to_prepare }
- else
- ActiveSupport::Reloader.to_prepare { SdkEngine.to_prepare }
- end
+ ActiveSupport::Reloader.to_prepare { SdkEngine.to_prepare }
# make sure our exceptions cause an adequate error page and http status code
config.action_dispatch.rescue_responses.merge!("Scrivito::ResourceNotFound" => :not_found)
initializer "scrivito.add_cms_routing_paths", :after => :add_routing_paths do |app|