Sha256: dd28956cf0d1f19e0f992b6116c6ddaa92d72510ce292cb6bd13f6f9cc046ff4

Contents?: true

Size: 583 Bytes

Versions: 2

Compression:

Stored size: 583 Bytes

Contents

# == Schema Information
#
# Table name: service_categories
#
#  id   :integer(4)      not null, primary key
#  name :string(255)     not null
#  sort :integer(4)      default(0)
#

class ServiceCategory < ActiveRecord::Base
  scope :sorted, order("sort ASC")
  has_many :services, :order => 'sort ASC'
  has_many :identity_services, :class_name => 'Service', :order => 'sort ASC', :conditions => ['use_for = ? AND active = ?', 'identity', true]
  has_many :tag_services, :class_name => 'Service', :order => 'sort ASC', :conditions => ['use_for = ? AND active = ?', 'tags', true]
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
muck-services-3.3.3 app/models/service_category.rb
muck-services-3.3.2 app/models/service_category.rb