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

Version Path
umlaut-4.1.7 app/models/referent_value.rb
umlaut-4.1.6 app/models/referent_value.rb
umlaut-4.1.5 app/models/referent_value.rb
umlaut-4.1.4 app/models/referent_value.rb
umlaut-4.1.3 app/models/referent_value.rb
umlaut-4.1.2 app/models/referent_value.rb
umlaut-4.1.1 app/models/referent_value.rb
umlaut-4.1.0 app/models/referent_value.rb
umlaut-4.1.0.pre3 app/models/referent_value.rb
umlaut-4.1.0.pre.2 app/models/referent_value.rb
umlaut-4.1.0.pre.alpha.1 app/models/referent_value.rb
umlaut-4.0.3 app/models/referent_value.rb
umlaut-4.0.2 app/models/referent_value.rb
umlaut-4.0.1 app/models/referent_value.rb
umlaut-4.0.0 app/models/referent_value.rb
umlaut-4.0.0.beta5 app/models/referent_value.rb
umlaut-4.0.0.beta4 app/models/referent_value.rb
umlaut-4.0.0.beta3 app/models/referent_value.rb
umlaut-4.0.0.beta2 app/models/referent_value.rb
umlaut-4.0.0.beta1 app/models/referent_value.rb