module Fiona7 class DefaultScrivitoCmsController < ActionController::Base include Scrivito::ControllerActions before_filter :assert_legacy_mode def index return deliver_file if @obj.binary? return redirect_to cms_path(@obj.fiona_obj) end protected def assert_legacy_mode raise "This controller should not be invoked outside legacy mode" unless Fiona7.mode == :legacy end end end