Class: Message
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Message
- Extended by:
- Enumerize
- Defined in:
- app/models/message.rb
Overview
typed: ignore user is polymorphic, it could be [User] or [Owner] content is polymorphic, it could be [Reservation] or [Reward] action_type is action type of a content, it could be create, edit, cancel, redeem, etc title and body is an message that can be sent to user
Instance Method Summary collapse
Methods inherited from ApplicationRecord
Instance Method Details
#deep_link ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/models/message.rb', line 13 def deep_link case content_type when "Reservation" "app://reservations/#{content_id}" when "Reward" "app://user/rewards" end end |