root/app/models/tag.rb @ 2a4e5c89
class Tag < ActiveRecord::Base
|
|
has_and_belongs_to_many :artworks
|
|
|
|
validates_presence_of :name
|
|
validates_uniqueness_of :name
|
|
validates_length_of :name, :within => 1..32, :allow_blank => false
|
|
end
|