mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-04 12:14:37 +08:00
fixes hound
This commit is contained in:
parent
525c9770ac
commit
d8a3fdea20
3 changed files with 7 additions and 12 deletions
|
@ -374,7 +374,7 @@ class MyModule < ApplicationRecord
|
|||
x: self.x,
|
||||
y: self.y)
|
||||
clone.save
|
||||
|
||||
|
||||
# Remove the automatically generated protocol,
|
||||
# & clone the protocol instead
|
||||
clone.protocol.destroy
|
||||
|
|
|
@ -11,13 +11,9 @@ class SampleMyModule < ApplicationRecord
|
|||
foreign_key: 'assigned_by_id',
|
||||
class_name: 'User',
|
||||
optional: true
|
||||
belongs_to :sample,
|
||||
inverse_of: :sample_my_modules,
|
||||
optional: true
|
||||
belongs_to :my_module,
|
||||
inverse_of: :sample_my_modules,
|
||||
optional: true
|
||||
|
||||
belongs_to :sample, inverse_of: :sample_my_modules, optional: true
|
||||
belongs_to :my_module, inverse_of: :sample_my_modules, optional: true
|
||||
|
||||
def increment_nr_of_module_samples
|
||||
my_module.increment!(:nr_of_assigned_samples)
|
||||
sample.increment!(:nr_of_modules_assigned_to)
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
class Token < ApplicationRecord
|
||||
validates :token, presence: true
|
||||
validates :ttl, presence: true
|
||||
validates :token, presence: true
|
||||
validates :ttl, presence: true
|
||||
|
||||
belongs_to :user,
|
||||
belongs_to :user,
|
||||
foreign_key: 'user_id',
|
||||
class_name: 'User',
|
||||
inverse_of: :tokens,
|
||||
optional: true
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue