Commit 500854ca8579765492b37ecec55a71002ba14f38

Authored by Karpikau Andrei
1 parent 114a04d9

check save repeat content

... ... @@ -278,7 +278,7 @@ module Kanjai
278 278 params.permit(:page => [:parent_id, :page_template_id, :title, :private_flag, :default_private_page, :root_page, :show_public_only,
279 279 :page_data_attributes => [:id, :title, :url, :meta_title, :meta_description, :meta_keywords]],
280 280 :page_content => [:type_content, :text_html, :controller_name, :action_name,
281   - page_content_markers_attributes: [:id, :page_content_id, :marker, :text_value, :attachment_file_name, :form_subject, :form_body, :from_mail, :to_mail, :form_answer_text]
  281 + page_content_markers_attributes: [:id, :page_content_id, :marker, :text_value, :attachment_file_name, :form_subject, :form_body, :from_mail, :to_mail, :form_answer_text, :_destroy]
282 282 ],
283 283 :page_datum => [:id, :title, :url, :meta_title, :meta_description, :meta_keywords]
284 284 )
... ...
... ... @@ -2,7 +2,7 @@ module Kanjai
2 2 class PageContentMarker < ActiveRecord::Base
3 3 belongs_to :page_content
4 4
5   - belongs_to :reference, polymorphic: true
  5 + belongs_to :reference, polymorphic: true, optional: true
6 6
7 7
8 8 def get_file_path
... ...
... ... @@ -53,7 +53,6 @@
53 53 <% end %>
54 54
55 55 <% row_items = @obj.page_content_markers.select{|item| item.row_item.to_i > 0}.collect(&:row_item).uniq %>
56   -
57 56 <% repeat_element = template_part.field_options.select{|item| item[:name] == 'repeat' }.first %>
58 57
59 58 <% if repeat_element.present? %>
... ...
1 1 module Kanjai
2   - VERSION = "0.0.104"
  2 + VERSION = "0.0.105"
3 3 end
... ...