mirror of
https://github.com/rickbarrette/redmine_qbo_calendar.git
synced 2026-10-03 20:40:43 -04:00
Normalize subject field by stripping whitespace and titleizing
This commit is contained in:
1 parent
8d4d9238dc
commit
b4be49816c
1 file changed
+2
@@ -19,6 +19,8 @@ class CustomerAppointment < ActiveRecord::Base
|
|||||||
validates :subject, presence: true
|
validates :subject, presence: true
|
||||||
validates :date, presence: true
|
validates :date, presence: true
|
||||||
|
|
||||||
|
normalizes :subject, with: ->(subject) { subject.strip.titleize }
|
||||||
|
|
||||||
STATUSES = %w[
|
STATUSES = %w[
|
||||||
Scheduled
|
Scheduled
|
||||||
CheckedIn
|
CheckedIn
|
||||||
|
|||||||
Reference in new issue
Block a user