Showing
2 changed files
with
3 additions
and
3 deletions
| @@ -19,9 +19,9 @@ module Kanjai | @@ -19,9 +19,9 @@ module Kanjai | ||
| 19 | def add_item | 19 | def add_item |
| 20 | @obj = PageContent.find(params[:id]) | 20 | @obj = PageContent.find(params[:id]) |
| 21 | 21 | ||
| 22 | - @row_item = @obj.build_markers_rows(@obj.type_content, params[:repeat_id], params[:parent_item_index]) | ||
| 23 | 22 | ||
| 24 | - @current_row = @obj.page_content_markers.where(parent_id: params[:repeat_id]).where('row_item != ?', @row_item).count | 23 | + @current_row = @obj.page_content_markers.count |
| 24 | + @row_item = @obj.build_markers_rows(@obj.type_content, params[:repeat_id], params[:parent_item_index]) | ||
| 25 | 25 | ||
| 26 | partial, locals = Kanjai::PageContent.edit_template(@obj.page, @obj.type_content) | 26 | partial, locals = Kanjai::PageContent.edit_template(@obj.page, @obj.type_content) |
| 27 | @template_part = locals[:template_part] | 27 | @template_part = locals[:template_part] |