Sha256: 516750a10d550d2be3510506005decbc3b3fe7a11d2c858f2617a216e739198a

Contents?: true

Size: 622 Bytes

Versions: 3

Compression:

Stored size: 622 Bytes

Contents

class ConfigurationOption < ActiveRecord::Base
  validates :internal_identifier, :uniqueness => {:scope => :id, :case_sensitive => false}

  has_and_belongs_to_many :configuration_item_types
  has_and_belongs_to_many :configuration_items

  validates :value, :presence => {:message => 'Value can not be blank.'}

  def to_js_hash
    {
      :id => self.id,
      :value => self.value,
      :description => self.description,
      :internalIdentifier => self.internal_identifier,
      :comment => self.comment,
      :createdAt => self.created_at,
      :updatedAt => self.updated_at
    }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
erp_app-3.0.16 app/models/configuration_option.rb
erp_app-3.0.15 app/models/configuration_option.rb
erp_app-3.0.14 app/models/configuration_option.rb