Class: UatActions::GeneratePrimerPanel

Inherits:
UatActions
  • Object
show all
Defined in:
app/uat_actions/uat_actions/generate_primer_panel.rb

Overview

Will construct a primer panel

Constant Summary

Constants inherited from UatActions

CATEGORY_LIST

Class Method Summary collapse

Instance Method Summary collapse

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

.defaultUatActions::GeneratePrimerPanel

Returns a default copy of the UatAction which will be used to fill in the form

Returns:



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

#performBoolean

[perform description]

Returns:

  • (Boolean)

    Returns true if the action was successful, false otherwise



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