Class: ReferentValue
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- ReferentValue
- Defined in:
- app/models/referent_value.rb
Class Method Summary collapse
-
.normalize(input) ⇒ Object
Class method to normalize a string for normalized_value attribute.
Class Method Details
.normalize(input) ⇒ Object
Class method to normalize a string for normalized_value attribute. Right now normalization is just downcasing. Only metadata values should be normalized (ie, not ‘identifier’ or ‘format’). identifier and format shoudl be stored in normalized_value unchanged.
12 13 14 |
# File 'app/models/referent_value.rb', line 12 def self.normalize(input) return input.scrub.downcase.to_s[0..254] end |