diff --git a/app/views/admin/seminars/_attribute_field.html.erb b/app/views/admin/seminars/_attribute_field.html.erb index 0dba59a..4cf958a 100644 --- a/app/views/admin/seminars/_attribute_field.html.erb +++ b/app/views/admin/seminars/_attribute_field.html.erb @@ -147,7 +147,7 @@ <% @site_in_use_locales.each do |locale| %> <% active = (locale == @site_in_use_locales.first ? "active in" : "'") %> <%= content_tag :div, {class: "tab-pane fade #{active}", id: "#{name_to_id(typeG_field_name)}_#{locale}"} do %> - <% locale_value = attribute_field["typeG"]["instructions"][locale.to_s] %> + <% locale_value = (attribute_field["typeG"].present? ? attribute_field["typeG"]["instructions"][locale.to_s] : "") %> <%= text_area(typeG_field_name, locale, value: locale_value, placeholder: "#{t(locale).to_s}", data: {:type=>"lang_#{locale}"}, class: 'ckeditor') %> <% end %> <% end %> diff --git a/app/views/admin/seminars/_attribute_submission_field.html.erb b/app/views/admin/seminars/_attribute_submission_field.html.erb index d819c14..dd93252 100644 --- a/app/views/admin/seminars/_attribute_submission_field.html.erb +++ b/app/views/admin/seminars/_attribute_submission_field.html.erb @@ -160,7 +160,7 @@ <% @site_in_use_locales.each do |locale| %> <% active = (locale == @site_in_use_locales.first ? "active in" : "'") %> <%= content_tag :div, {class: "tab-pane fade #{active}", id: "#{name_to_id(typeG_field_name)}_#{locale}"} do %> - <% locale_value = attribute_submission_field["typeG"]["instructions"][locale.to_s] %> + <% locale_value = (attribute_submission_field["typeG"].present? ? attribute_submission_field["typeG"]["instructions"][locale.to_s] : "") %> <%= text_area(typeG_field_name, locale, value: locale_value, placeholder: "#{t(locale).to_s}", data: {:type=>"lang_#{locale}"}, class: 'ckeditor') %> <% end %> <% end %> diff --git a/custom_gallery/app/controllers/admin/custom_galleries_controller.rb b/custom_gallery/app/controllers/admin/custom_galleries_controller.rb index 0dfeeac..e37e314 100644 --- a/custom_gallery/app/controllers/admin/custom_galleries_controller.rb +++ b/custom_gallery/app/controllers/admin/custom_galleries_controller.rb @@ -502,7 +502,7 @@ class Admin::CustomGalleriesController < OrbitAdminController theater_link: admin_image_path(values), description: values.description, title: values.title, - file: values.file.as_json[:file], + file: values.file.as_json, custom_gallery_custom_album_id: values.custom_album_id, order: values.order, tags: values.tags} diff --git a/custom_gallery/app/controllers/custom_galleries_controller.rb b/custom_gallery/app/controllers/custom_galleries_controller.rb index 64ea006..07566db 100644 --- a/custom_gallery/app/controllers/custom_galleries_controller.rb +++ b/custom_gallery/app/controllers/custom_galleries_controller.rb @@ -242,7 +242,7 @@ class CustomGalleriesController < ApplicationController title: values.title, alt_title: alt_text, url: values.file.url, - file: values.file.as_json[:file], + file: values.file.as_json, custom_gallery_custom_album_id: values.custom_album_id, tags: values.tags} end