Module: Labimotion::SampleAssociationHelpers
- Extended by:
- Grape::API::Helpers
- Defined in:
- lib/labimotion/helpers/sample_association_helpers.rb
Overview
Helper for associated sample
Instance Method Summary collapse
- #build_sample(sid, cols, current_user, cr_opt) ⇒ Object
- #build_table_sample(field_tables, current_user, element) ⇒ Object
- #update_sample_association(properties, current_user, element) ⇒ Object
Instance Method Details
#build_sample(sid, cols, current_user, cr_opt) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/labimotion/helpers/sample_association_helpers.rb', line 8 def build_sample(sid, cols, current_user, cr_opt) Labimotion::SampleAssociation.build_sample(sid, cols, current_user, cr_opt) rescue StandardError => e Labimotion.log_exception(e, current_user) nil end |
#build_table_sample(field_tables, current_user, element) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/labimotion/helpers/sample_association_helpers.rb', line 15 def build_table_sample(field_tables, current_user, element) Labimotion::SampleAssociation.build_table_sample(field_tables, current_user, element) rescue StandardError => e Labimotion.log_exception(e, current_user) [] end |
#update_sample_association(properties, current_user, element) ⇒ Object
22 23 24 25 26 |
# File 'lib/labimotion/helpers/sample_association_helpers.rb', line 22 def update_sample_association(properties, current_user, element) Labimotion::SampleAssociation.update_sample_association(properties, current_user, element) rescue StandardError => e Labimotion.log_exception(e, current_user) end |