Sha256: de5036b4002901bf6a7e9262d9d3aae433756a0a4c78166868585ba921934214
Contents?: true
Size: 569 Bytes
Versions: 20
Compression:
Stored size: 569 Bytes
Contents
class ReferentValue < ActiveRecord::Base if Rails::VERSION::MAJOR >= 4 belongs_to :referent, lambda { includes :referent_values } else belongs_to :referent, :include => :referent_values end # 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. def self.normalize(input) return input.scrub.downcase.to_s[0..254] end end
Version data entries
20 entries across 20 versions & 1 rubygems