diff --git a/app/models/column_entry.rb b/app/models/column_entry.rb index 4da8599..1d80c45 100644 --- a/app/models/column_entry.rb +++ b/app/models/column_entry.rb @@ -11,8 +11,8 @@ class ColumnEntry mount_uploader :image, ImageUploader - belongs_to :table_entry, :dependent => :destroy, index: true - belongs_to :table_column, :dependent => :destroy, index: true + belongs_to :table_entry, index: true + belongs_to :table_column, index: true I18n.available_locales.each do |locale| index({text: 1}, { collation: {locale: locale.to_s}, unique: false, background: true }) diff --git a/app/models/table_column.rb b/app/models/table_column.rb index f748a5b..362c501 100644 --- a/app/models/table_column.rb +++ b/app/models/table_column.rb @@ -12,7 +12,7 @@ class TableColumn field :make_categorizable, type: Boolean, default: false field :default_ordered_field, type: Boolean, default: false field :order_direction,type: String,default: 'desc' - belongs_to :u_table, :dependent => :destroy, index: true + belongs_to :u_table, index: true has_many :column_entries diff --git a/app/models/table_entry.rb b/app/models/table_entry.rb index 18a0de3..4691df1 100644 --- a/app/models/table_entry.rb +++ b/app/models/table_entry.rb @@ -7,7 +7,7 @@ class TableEntry field :sort_number, type: Integer has_many :column_entries, :dependent => :destroy - belongs_to :u_table, :dependent => :destroy, index: true + belongs_to :u_table, index: true accepts_nested_attributes_for :column_entries, :allow_destroy => true