class Tag < ActiveRecord::Base
  has_and_belongs_to_many :songs

  validates_presence_of :name
  validates_length_of :name, 
                      :maximum => 15, 
                      :message => "Length of tag is too long! Maximum of 15 characters allowed."
                      
  #def tags_attributes=(tags_attributes)
  #  tags_attributes.each do |attributes|
  #    tags.build(tags_attributes)
  #   end
  #end

end
