Class: Appeal
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Appeal
- Includes:
- HasOwner, Toggleable
- Defined in:
- app/models/appeal.rb
Constant Summary collapse
- PER_PAGE =
20
- SUBJECT_LIMIT =
140
- NAME_LIMIT =
100
- EMAIL_LIMIT =
200
- PHONE_LIMIT =
30
- BODY_LIMIT =
5000
Class Method Summary collapse
- .creation_parameters ⇒ Object
- .entity_parameters ⇒ Object
- .page_for_administration(page = 1) ⇒ Object
Instance Method Summary collapse
Class Method Details
.creation_parameters ⇒ Object
35 36 37 |
# File 'app/models/appeal.rb', line 35 def self.creation_parameters i(name phone email subject body) end |
.entity_parameters ⇒ Object
39 40 41 |
# File 'app/models/appeal.rb', line 39 def self.entity_parameters i(response) end |
.page_for_administration(page = 1) ⇒ Object
31 32 33 |
# File 'app/models/appeal.rb', line 31 def self.page_for_administration(page = 1) recent.page(page).per(PER_PAGE) end |
Instance Method Details
#apply_user(user) ⇒ Object
44 45 46 47 48 49 |
# File 'app/models/appeal.rb', line 44 def apply_user(user) return if user.nil? self.name = user.profile_name self.email = user.email self.phone = user.phone end |