Class: UatActions::GeneratePrimerPanel
- Inherits:
-
UatActions
- Object
- UatActions
- UatActions::GeneratePrimerPanel
- Defined in:
- app/uat_actions/uat_actions/generate_primer_panel.rb
Overview
Will construct a primer panel
Constant Summary
Constants inherited from UatActions
Class Method Summary collapse
-
.default ⇒ UatActions::GeneratePrimerPanel
Returns a default copy of the UatAction which will be used to fill in the form.
Instance Method Summary collapse
-
#perform ⇒ Boolean
[perform description].
Methods inherited from UatActions
all, category, find, form_field, form_fields, #form_fields, grouped_and_sorted_uat_actions, id, inherited, permitted, #report, #save, to_partial_path, uat_actions
Class Method Details
.default ⇒ UatActions::GeneratePrimerPanel
Returns a default copy of the UatAction which will be used to fill in the form
45 46 47 |
# File 'app/uat_actions/uat_actions/generate_primer_panel.rb', line 45 def self.default new(snp_count: 48, pcr_1_name: 'Program 1', pcr_2_name: 'Program 2', pcr_1_duration: 60, pcr_2_duration: 60) end |
Instance Method Details
#perform ⇒ Boolean
[perform description]
53 54 55 56 57 58 59 60 61 62 |
# File 'app/uat_actions/uat_actions/generate_primer_panel.rb', line 53 def perform # Called by the controller once the form is filled in. Add your actual actions here. # All the form fields are accessible as simple attributes. # Return true if everything works report[:name] = name return true if existing_primer_panel primer_panel = PrimerPanel.create!(primer_panel_params) primer_panel.save end |