Commit 75d5b515d3d35ae9bd4ff04451326cfb56ce701d

Authored by Karpikau Andrei
1 parent 72b22925

check update template

@@ -23,8 +23,8 @@ module Kanjai @@ -23,8 +23,8 @@ module Kanjai
23 end 23 end
24 end 24 end
25 25
26 - def build_markers(type_content)  
27 - if type_content != 'rte_editor' and type_content != self.type_content 26 + def build_markers(type_content, build_always = false)
  27 + if type_content != 'rte_editor' and (type_content != self.type_content || build_always)
28 28
29 29
30 self.update_column(:type_content, type_content) 30 self.update_column(:type_content, type_content)
@@ -98,7 +98,7 @@ module Kanjai @@ -98,7 +98,7 @@ module Kanjai
98 98
99 Kanjai::PageContent.where(type_content: item[:code]).each do |page_content| 99 Kanjai::PageContent.where(type_content: item[:code]).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]) 101 + page_content.build_markers(item[:code], true)
102 else 102 else
103 langs = page_content.page_content_markers.pluck(:lang).uniq 103 langs = page_content.page_content_markers.pluck(:lang).uniq
104 row_indexes = page_content.page_content_markers.pluck(:row_item).uniq 104 row_indexes = page_content.page_content_markers.pluck(:row_item).uniq
1 module Kanjai 1 module Kanjai
2 - VERSION = "0.0.185" 2 + VERSION = "0.0.186"
3 end 3 end