lib/fiona7/controller_helper.rb in infopark_fiona7-0.71.0.4 vs lib/fiona7/controller_helper.rb in infopark_fiona7-0.71.0.6
- old
+ new
@@ -1,20 +1,12 @@
+require 'fiona7/in_editable_view'
+
module Fiona7
module ControllerHelper
- def editing_context
- Scrivito::EditingContextMiddleware.from_request(request)
- end
+ include InEditableView
- def scrivito_in_editable_view?
- editing_context.editable_display_mode?
- end
-
- def fiona7_in_editable_view?
- scrivito_in_editable_view?
- end
-
def self.included(base)
- base.send(:helper_method, :scrivito_in_editable_view?)
- base.send(:helper_method, :fiona7_in_editable_view?)
+ base.__send__(:helper_method, :scrivito_in_editable_view?)
+ base.__send__(:helper_method, :fiona7_in_editable_view?)
end
end
end