Class: FeedbackRequest

Inherits:
ApplicationRecord show all
Includes:
Toggleable
Defined in:
app/models/feedback_request.rb

Overview

Feedback request

Attributes:

agent_id [Agent], optional
comment [text]
consent [boolean]
created_at [DateTime]
data [jsonb]
email [string], optional
image [string], optional
ip [inet], optional
language_id [Language], optional
name [string], optional
phone [string], optional
processed [boolean]
updated_at [DateTime]
user_id [User], optional

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

Class Method Details

.creation_parametersObject



51
52
53
# File 'app/models/feedback_request.rb', line 51

def self.creation_parameters
  %i[comment consent email name phone]
end

.page_for_administration(page = 1) ⇒ Object

Parameters:

  • page (Integer) (defaults to: 1)


47
48
49
# File 'app/models/feedback_request.rb', line 47

def self.page_for_administration(page = 1)
  list_for_administration.page(page)
end