Sha256: ce978d50625c76ef29faaf058df55621e4fe185201d4b4af5bee9bbb17636436

Contents?: true

Size: 606 Bytes

Versions: 3

Compression:

Stored size: 606 Bytes

Contents

class Color < ActiveRecord::Base
  attr_accessible :code, :property

  belongs_to :library_group
  validates :code, presence: true, format: /\A[A-Fa-f0-9]{6}\Z/
  validates :property, presence: true, uniqueness: true, format: /\A[a-z][0-9a-z_]*[0-9a-z]\Z/

  acts_as_list
end

# == Schema Information
#
# Table name: colors
#
#  id               :integer          not null, primary key
#  library_group_id :integer
#  property         :string(255)
#  code             :string(255)
#  position         :integer
#  created_at       :datetime         not null
#  updated_at       :datetime         not null
#

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
enju_library-0.1.0.pre39 app/models/color.rb
enju_library-0.1.0.pre38 app/models/color.rb
enju_library-0.1.0.pre37 app/models/color.rb