Sha256: 559f1561a57c2bfc6500f764700e3ef8292fb90575e9238421ac67802edd6110

Contents?: true

Size: 607 Bytes

Versions: 4

Compression:

Stored size: 607 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

4 entries across 4 versions & 1 rubygems

Version Path
enju_library-0.1.0.pre43 app/models/color.rb
enju_library-0.1.0.pre42 app/models/color.rb
enju_library-0.1.0.pre41 app/models/color.rb
enju_library-0.1.0.pre40 app/models/color.rb