Class: ReferentValue

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/referent_value.rb

Class Method Summary (collapse)

Class Method Details

+ (Object) normalize(input)

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