We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16214a1 commit 7b056f9Copy full SHA for 7b056f9
app/models/lab_tech/result.rb
@@ -22,10 +22,14 @@ class Result < ApplicationRecord
22
23
##### CLASS METHODS #####
24
25
- def self.record_a_science( experiment, scientist_result, **kwargs )
26
- self.create!(experiment: experiment) do |result|
27
- result.record_a_science scientist_result, **kwargs
+ # ugh: https://eregon.me/blog/2021/02/13/correct-delegation-in-ruby-2-27-3.html
+ class << self
+ def record_a_science( experiment, scientist_result, *args )
28
+ create!(experiment: experiment) do |result|
29
+ result.record_a_science scientist_result, *args
30
+ end
31
end
32
+ ruby2_keywords :record_a_science if respond_to?(:ruby2_keywords, true)
33
34
35
0 commit comments