Class: FeedbackMessage
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- FeedbackMessage
- Includes:
- Checkable, HasLanguage, HasOwner, HasTrack, HasUuid, Toggleable
- Defined in:
- app/models/feedback_message.rb
Overview
Message from visitor
Attributes:
agent_id [Agent], optional
[SimpleFileUploader], optional
comment [text], optional
created_at [DateTime]
data [jsonb]
email [string], optional
ip_address_id [IpAddress], optional
language_id [Language], optional
name [string], optional
phone [string], optional
processed [boolean]
updated_at [DateTime]
user_id [User], optional
uuid [uuid]
Constant Summary collapse
- COMMENT_LIMIT =
5000
- EMAIL_LIMIT =
250
- EMAIL_PATTERN =
/\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z0-9][-a-z0-9]+)\z/i.freeze
- NAME_LIMIT =
100
- PHONE_LIMIT =
30
Class Method Summary collapse
Instance Method Summary collapse
Methods included from HasOwner
Class Method Details
.entity_parameters ⇒ Object
56 57 58 |
# File 'app/models/feedback_message.rb', line 56 def self.entity_parameters %i[attachment comment email language_id name phone] end |
.page_for_administration(page = 1) ⇒ Object
52 53 54 |
# File 'app/models/feedback_message.rb', line 52 def self.page_for_administration(page = 1) list_for_administration.page(page) end |
Instance Method Details
#attachment_name ⇒ Object
60 61 62 63 64 |
# File 'app/models/feedback_message.rb', line 60 def return if .blank? File.basename(.path) end |