lib/scrivito/page_config.rb in scrivito_sdk-1.3.1 vs lib/scrivito/page_config.rb in scrivito_sdk-1.4.0.rc1
- old
+ new
@@ -8,16 +8,25 @@
def to_json
{
current_page: current_page_config,
user_id: user_id_config,
+ preloaded_obj_data: preloaded_obj_data
}.to_json
end
private
def user_id_config
editor.id
+ end
+
+ def preloaded_obj_data
+ if obj
+ [obj.data_from_cms.to_h]
+ else
+ []
+ end
end
def current_page_config
return {} unless obj
{