We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b992d8d commit e357cd2Copy full SHA for e357cd2
app/models/chapter.rb
@@ -5,7 +5,7 @@ class Chapter < ApplicationRecord
5
has_many :manpower_surveys
6
validates_presence_of :name
7
8
- before_save :normalize_field
+ before_save :normalize_fields
9
10
default_scope { order(chapter_roll: :asc) }
11
scope :active, -> { where(status: 1) }
@@ -94,9 +94,12 @@ class Chapter < ApplicationRecord
94
'Omega' => 'Ω'
95
}.freeze
96
97
- def normalize_field
+ def normalize_fields
98
return unless institution_name.present?
99
100
+ # Decode HTML entities
101
+ institution_name.replace(CGI.unescapeHTML(institution_name))
102
+
103
institution_name.gsub!(' Of ', ' of ')
104
institution_name.gsub!(' At ', ' at ')
105
institution_name.gsub!(' And ', ' and ')
0 commit comments