greeting_card/app/models/greeting_card_status_histor...

17 lines
370 B
Ruby
Raw Normal View History

2024-12-02 00:35:08 +00:00
class GreetingCardStatusHistory
include Mongoid::Document
include Mongoid::Timestamps
field :status, type: String
field :comment, type: String
belongs_to :user
belongs_to :greeting_card_record
mount_uploader :file, AssetUploader
def modified_by_name
if user.present? && user.member_profile.present?
user.member_profile.name
end
end
end