Fix model dependencies.
This commit is contained in:
1 parent
659ab43e94
commit
2d00288a4c
3 files changed
+4
-4
No files matched your search
@@ -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 })
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user