Sha256: e976dab02306e6466e5e039689fd993abd4d2dfd0425322a9393e841ff53b2e9

Contents?: true

Size: 333 Bytes

Versions: 8

Compression:

Stored size: 333 Bytes

Contents

class Note < ActiveRecord::Base
  belongs_to :note_type
  belongs_to :noted_record, :polymorphic => true
  belongs_to :created_by, :class_name => 'Party', :foreign_key => 'created_by_id'

  def note_type_desc
    self.note_type.description
  end

  def summary
    (content.length > 20) ? "#{content[0..20]}..." : content
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
erp_base_erp_svcs-3.0.7 app/models/note.rb
erp_base_erp_svcs-3.0.6 app/models/note.rb
erp_base_erp_svcs-3.0.5 app/models/note.rb
erp_base_erp_svcs-3.0.4 app/models/note.rb
erp_base_erp_svcs-3.0.3 app/models/note.rb
erp_base_erp_svcs-3.0.2 app/models/note.rb
erp_base_erp_svcs-3.0.1 app/models/note.rb
erp_base_erp_svcs-3.0.0 app/models/note.rb