module ErpBaseErpSvcs::Extensions::ActiveRecord::HasNotes::ClassMethods
Public Instance Methods
by_type(note_type_iid)
click to toggle source
# File lib/erp_base_erp_svcs/extensions/active_record/has_notes.rb, line 13 def by_type(note_type_iid) where('note_type_id = ?', NoteType.iid(note_type_iid)) end
has_notes()
click to toggle source
# File lib/erp_base_erp_svcs/extensions/active_record/has_notes.rb, line 10 def has_notes has_many :notes, :as => :noted_record, :dependent => :delete_all do def by_type(note_type_iid) where('note_type_id = ?', NoteType.iid(note_type_iid)) end end extend SingletonMethods include InstanceMethods end