Module: Models::Notable

Extended by:
ActiveSupport::Concern
Included in:
Delivery, Invoice, Opportunity, Order, Party, Quote
Defined in:
app/concerns/models/notable.rb

Overview

ActiveSupport::Concern mixin: notable.

Instance Method Summary collapse

Instance Method Details

#quick_note(content) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'app/concerns/models/notable.rb', line 9

def quick_note(content)
  return if content.blank?

  party_id = begin
    primary_party.id
  rescue StandardError
    nil
  end
  activities.create(party_id: party_id, new_note: content) unless party_id.nil?
end