root/app/models/tag.rb @ ec3dc179
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
|