Showing
3 changed files
with
4 additions
and
4 deletions
| ... | ... | @@ -23,8 +23,8 @@ module Kanjai |
| 23 | 23 | end |
| 24 | 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 | 30 | self.update_column(:type_content, type_content) | ... | ... |
| ... | ... | @@ -98,7 +98,7 @@ module Kanjai |
| 98 | 98 | |
| 99 | 99 | Kanjai::PageContent.where(type_content: item[:code]).each do |page_content| |
| 100 | 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 | 102 | else |
| 103 | 103 | langs = page_content.page_content_markers.pluck(:lang).uniq |
| 104 | 104 | row_indexes = page_content.page_content_markers.pluck(:row_item).uniq | ... | ... |