Commit b46f785e233f10eb38fad933ce9af0a64f7e7ab7

Authored by Karpikau Andrei
1 parent d5df2151

check save template

@@ -96,7 +96,7 @@ module Kanjai @@ -96,7 +96,7 @@ module Kanjai
96 new_markers_general = item[:field_options].select{|item| item[:attributes]['repeat'] == 'false' }.collect{|item| item[:name] } 96 new_markers_general = item[:field_options].select{|item| item[:attributes]['repeat'] == 'false' }.collect{|item| item[:name] }
97 new_markers_repeat = item[:field_options].select{|item| item[:attributes]['repeat'] == 'true' }.collect{|item| item[:name] } 97 new_markers_repeat = item[:field_options].select{|item| item[:attributes]['repeat'] == 'true' }.collect{|item| item[:name] }
98 98
99 - Kanjai::PageContent.where(type_content: item[:code]).each do |page_content| 99 + Kanjai::PageContent.joins(page: :page_template).where(type_content: item[:code], kanjai_templates: {id: self.id}).each do |page_content|
100 if page_content.page_content_markers.count == 0 100 if page_content.page_content_markers.count == 0
101 page_content.build_markers(item[:code], true) 101 page_content.build_markers(item[:code], true)
102 else 102 else
1 module Kanjai 1 module Kanjai
2 - VERSION = "0.0.197" 2 + VERSION = "0.0.198"
3 end 3 end