mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-06 13:14:29 +08:00
fixes hound
This commit is contained in:
parent
525c9770ac
commit
d8a3fdea20
3 changed files with 7 additions and 12 deletions
|
@ -11,12 +11,8 @@ class SampleMyModule < ApplicationRecord
|
||||||
foreign_key: 'assigned_by_id',
|
foreign_key: 'assigned_by_id',
|
||||||
class_name: 'User',
|
class_name: 'User',
|
||||||
optional: true
|
optional: true
|
||||||
belongs_to :sample,
|
belongs_to :sample, inverse_of: :sample_my_modules, optional: true
|
||||||
inverse_of: :sample_my_modules,
|
belongs_to :my_module, inverse_of: :sample_my_modules, optional: true
|
||||||
optional: true
|
|
||||||
belongs_to :my_module,
|
|
||||||
inverse_of: :sample_my_modules,
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
def increment_nr_of_module_samples
|
def increment_nr_of_module_samples
|
||||||
my_module.increment!(:nr_of_assigned_samples)
|
my_module.increment!(:nr_of_assigned_samples)
|
||||||
|
|
|
@ -7,5 +7,4 @@ class Token < ApplicationRecord
|
||||||
class_name: 'User',
|
class_name: 'User',
|
||||||
inverse_of: :tokens,
|
inverse_of: :tokens,
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue