Class: CandidateSubmission
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- CandidateSubmission
- Defined in:
- app/models/candidate_submission.rb
Instance Method Summary collapse
- #clone ⇒ Object
-
#dba_organization ⇒ Object
helper method to get dba_organization related to this candidate_submission’s order line item.
-
#order_txn ⇒ Object
must be after is_json.
Instance Method Details
#clone ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'app/models/candidate_submission.rb', line 27 def clone new_candidate_submission = CandidateSubmission.new new_candidate_submission.description = self.description new_candidate_submission.internal_identifier = self.internal_identifier new_candidate_submission.custom_fields = self.custom_fields new_candidate_submission.save! new_candidate_submission end |
#dba_organization ⇒ Object
helper method to get dba_organization related to this candidate_submission’s order line item
20 21 22 23 24 25 |
# File 'app/models/candidate_submission.rb', line 20 def dba_organization order_line_item = OrderLineItem.find(order_line_item_id) unless order_line_item.nil? order_line_item.dba_organization end end |
#order_txn ⇒ Object
must be after is_json
14 15 16 |
# File 'app/models/candidate_submission.rb', line 14 def order_txn self.order_line_item.order_txn end |