Class: UatActions::GenerateTagGroup
- Inherits:
-
UatActions
- Object
- UatActions
- UatActions::GenerateTagGroup
- Defined in:
- app/uat_actions/uat_actions/generate_tag_group.rb
Overview
Will construct plates with well_count wells filled with samples
Class Method Summary collapse
-
.default ⇒ UatActions::GenerateTagGroup
Returns a default copy of the UatAction which will be used to fill in the form.
Instance Method Summary collapse
- #existing_tags ⇒ Object
-
#perform ⇒ Boolean
[perform description].
Methods inherited from UatActions
all, find, form_field, form_fields, #form_fields, id, inherited, permitted, #report, #save, to_partial_path, uat_actions
Class Method Details
.default ⇒ UatActions::GenerateTagGroup
Returns a default copy of the UatAction which will be used to fill in the form
31 32 33 |
# File 'app/uat_actions/uat_actions/generate_tag_group.rb', line 31 def self.default new(size: 384) end |
Instance Method Details
#existing_tags ⇒ Object
53 54 55 |
# File 'app/uat_actions/uat_actions/generate_tag_group.rb', line 53 def @tag_group..count end |
#perform ⇒ Boolean
- perform description
39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'app/uat_actions/uat_actions/generate_tag_group.rb', line 39 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_tag_group tag_group = TagGroup.create!(name: name) tag_group..build(OligoEnumerator.new(size.to_i).each_with_index.map do |oligo, map_id| { oligo: oligo, map_id: map_id + 1 } end) tag_group.save end |