Sha256: 07ef971e421484362f0bc1c6cb5e02e183a0e27949abff9f5c66caadbd9cbe2e

Contents?: true

Size: 512 Bytes

Versions: 32

Compression:

Stored size: 512 Bytes

Contents

class Segment < ActiveRecord::Base
  attr_accessible :organization, :search, :search_id, :name

  belongs_to :organization
  belongs_to :search

  default_scope { order("created_at DESC") }

  validates_presence_of :organization_id
  validates_presence_of :search_id
  validates :name, :presence => true, :length => { :maximum => 128 }

  delegate :length, :to => :search
  delegate :description, :to => :search

  def people
    @people ||= search.people
  end

  def tag(tag)
    self.search.tag(tag)
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
artfully_ose-1.3.0.pre4 app/models/segment.rb
artfully_ose-1.3.0.pre3 app/models/segment.rb
artfully_ose-1.3.0.pre2 app/models/segment.rb
artfully_ose-1.3.0.pre1 app/models/segment.rb
artfully_ose-1.2.0 app/models/segment.rb
artfully_ose-1.2.0.beta.1 app/models/segment.rb
artfully_ose-1.2.0.alpha.2 app/models/segment.rb
artfully_ose-1.2.0.alpha.1 app/models/segment.rb
artfully_ose-1.2.0.pre.27 app/models/segment.rb
artfully_ose-1.2.0.pre.26 app/models/segment.rb
artfully_ose-1.2.0.pre.24 app/models/segment.rb
artfully_ose-1.2.0.pre.23 app/models/segment.rb
artfully_ose-1.2.0.pre.21 app/models/segment.rb
artfully_ose-1.2.0.pre.20 app/models/segment.rb
artfully_ose-1.2.0.pre.19 app/models/segment.rb
artfully_ose-1.2.0.pre.18 app/models/segment.rb
artfully_ose-1.2.0.pre.17 app/models/segment.rb
artfully_ose-1.2.0.pre.16 app/models/segment.rb
artfully_ose-1.2.0.pre.15 app/models/segment.rb
artfully_ose-1.2.0.pre.12 app/models/segment.rb