Sha256: 49905a3f9750d65f9d2e9b56e2e24785f13e8bfd0463cdbe69c271babb1a8fb4

Contents?: true

Size: 562 Bytes

Versions: 14

Compression:

Stored size: 562 Bytes

Contents

# == Schema Information
#
# Table name: lentil_tags
#
#  id         :integer          not null, primary key
#  name       :string(255)
#  created_at :datetime         not null
#  updated_at :datetime         not null
#

class Lentil::Tag < ActiveRecord::Base
  attr_accessible :name, :staff_tag

  has_many :tagset_assignments
  has_many :tagsets, :through=>:tagset_assignments

  has_many :taggings
  has_many :images, :through=>:taggings

  validates_presence_of :name

  scope :harvestable, where(:lentil_tagsets => {:harvest => true}).includes(:tagsets)
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
lentil-0.2.3 app/models/lentil/tag.rb
lentil-0.2.2 app/models/lentil/tag.rb
lentil-0.2.1 app/models/lentil/tag.rb
lentil-0.2.0 app/models/lentil/tag.rb
lentil-0.1.8 app/models/lentil/tag.rb
lentil-0.1.7 app/models/lentil/tag.rb
lentil-0.1.6 app/models/lentil/tag.rb
lentil-0.1.3 app/models/lentil/tag.rb
lentil-0.1.2 app/models/lentil/tag.rb
lentil-0.1.1 app/models/lentil/tag.rb
lentil-0.1.0 app/models/lentil/tag.rb
lentil-0.0.3.pre app/models/lentil/tag.rb
lentil-0.0.2.pre app/models/lentil/tag.rb
lentil-0.0.1.pre app/models/lentil/tag.rb