diff --git a/app/models/repository_cell.rb b/app/models/repository_cell.rb index da25cd46d..67c06085c 100644 --- a/app/models/repository_cell.rb +++ b/app/models/repository_cell.rb @@ -19,7 +19,7 @@ class RepositoryCell < ApplicationRecord includes(:repository_cell) .where(repository_cells: { value_type: 'RepositoryNumberValue' }) end), - optional: true, foreign_key: :value_id + optional: true, foreign_key: :value_id, inverse_of: :repository_cell belongs_to :repository_date_time_value, (lambda do includes(:repository_cell) diff --git a/app/models/repository_number_value.rb b/app/models/repository_number_value.rb index c31f9c7f8..824f6230a 100644 --- a/app/models/repository_number_value.rb +++ b/app/models/repository_number_value.rb @@ -2,9 +2,9 @@ class RepositoryNumberValue < ApplicationRecord belongs_to :created_by, foreign_key: :created_by_id, class_name: 'User', - inverse_of: :created_repositroy_number_values + inverse_of: :created_repository_number_values belongs_to :last_modified_by, foreign_key: :last_modified_by_id, class_name: 'User', - inverse_of: :modified_repositroy_number_values + inverse_of: :modified_repository_number_values has_one :repository_cell, as: :value, dependent: :destroy, inverse_of: :value accepts_nested_attributes_for :repository_cell diff --git a/app/models/user.rb b/app/models/user.rb index 4d106c97d..39263392d 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -264,12 +264,12 @@ class User < ApplicationRecord foreign_key: 'last_modified_by_id', inverse_of: :last_modified_by, dependent: :nullify - has_many :created_repositroy_number_values, + has_many :created_repository_number_values, class_name: 'RepositoryNumberValue', foreign_key: 'created_by_id', inverse_of: :created_by, dependent: :nullify - has_many :modified_repositroy_number_values, + has_many :modified_repository_number_values, class_name: 'RepositoryNumberValue', foreign_key: 'last_modified_by_id', inverse_of: :last_modified_by, diff --git a/app/views/repository_columns/manage_column_partials/_number.html.erb b/app/views/repository_columns/manage_column_partials/_number.html.erb index 52629e0d1..03ffa9b0f 100644 --- a/app/views/repository_columns/manage_column_partials/_number.html.erb +++ b/app/views/repository_columns/manage_column_partials/_number.html.erb @@ -5,6 +5,7 @@ <%= t('libraries.manange_modal_column.number_type.decimals_label') %>