Sha256: 3d181547345724c067937669460d8b3555a355a0786115c466de89747a6d6c48
Contents?: true
Size: 451 Bytes
Versions: 7
Compression:
Stored size: 451 Bytes
Contents
module Piggybak class OrderNote < ActiveRecord::Base validates :user_id, presence: true validates :order_id, presence: true belongs_to :order belongs_to :user default_scope { order('created_at ASC') } def details "<b>#{created_at.strftime("%m-%d-%Y %H:%M")}</b> by #{user ? user.email : 'N/A'}:<br />#{note}" end def admin_label "Order Note: #{created_at.strftime("%m-%d-%Y %H:%M")}" end end end
Version data entries
7 entries across 7 versions & 1 rubygems