Sha256: 9549d9b9d8ddb7bc9b042f5da173d96e0f44f3cc7fccaed426e6b27680d9f06d

Contents?: true

Size: 563 Bytes

Versions: 30

Compression:

Stored size: 563 Bytes

Contents

class ReferentValue < ActiveRecord::Base
  belongs_to :referent, :include => :referent_values

  # 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)
      # 'mb_chars' is neccesary for unicode.
      # normalized_value column only holds 254 bytes.. 
      return input.mb_chars.downcase.to_s[0..254]
  end
  
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
umlaut-3.0.3 app/models/referent_value.rb
umlaut-3.0.2 app/models/referent_value.rb
umlaut-3.0.1 app/models/referent_value.rb
umlaut-3.0.0 app/models/referent_value.rb
umlaut-3.0.0rc1 app/models/referent_value.rb
umlaut-3.0.0beta10 app/models/referent_value.rb
umlaut-3.0.0beta9 app/models/referent_value.rb
umlaut-3.0.0beta8 app/models/referent_value.rb
umlaut-3.0.0beta7 app/models/referent_value.rb
umlaut-3.0.0beta6 app/models/referent_value.rb
umlaut-3.0.0beta5 app/models/referent_value.rb
umlaut-3.0.0beta4 app/models/referent_value.rb
umlaut-3.0.0beta3 app/models/referent_value.rb
umlaut-3.0.0beta2 app/models/referent_value.rb
umlaut-3.0.0beta1 app/models/referent_value.rb
umlaut-3.0.0alpha15 app/models/referent_value.rb
umlaut-3.0.0alpha14 app/models/referent_value.rb
umlaut-3.0.0alpha13 app/models/referent_value.rb
umlaut-3.0.0alpha12 app/models/referent_value.rb
umlaut-3.0.0alpha11 app/models/referent_value.rb