require "base64" module Ecoportal module API class V2 class Page class Force class Helper < Ecoportal::API::Common::Content::DoubleModel class << self def new_doc { "id" => new_uuid } end end passkey :id passforced :patch_ver, default: 1 passthrough :script passthrough :name, :file_path, :content_b64, read_only: true def ooze self._parent.ooze end def force self._parent._parent end def script=(value) doc["content_b64"] = Base64.encode64(value) doc["script"] = value force.update_script value end end end end end end end require 'ecoportal/api/v2/page/force/binding' require 'ecoportal/api/v2/page/force/bindings'