Module: Models::Notable

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

Instance Method Summary collapse

Instance Method Details

#quick_note(content) ⇒ Object



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

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