Sha256: b8ba8e3c2e4925112ce671aae67a6e704b8aced7bf835f96fd977279acabea17

Contents?: true

Size: 288 Bytes

Versions: 33

Compression:

Stored size: 288 Bytes

Contents

class Category < ActiveRecord::Base
  has_many :categories_topics
  has_many :topics, :through => :categories_topics, :order => "categories_topics.sort DESC"

  attr_protected []

  validates :title, :presence => true, :uniqueness => true

  def name # for RailsAdmin
    title
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
gb_mapfish_appserver-2.0.0 app/models/category.rb
gb_mapfish_appserver-1.1.1 app/models/category.rb
gb_mapfish_appserver-1.1.0 app/models/category.rb
gb_mapfish_appserver-1.0.6 app/models/category.rb
gb_mapfish_appserver-1.0.5 app/models/category.rb
gb_mapfish_appserver-1.0.4 app/models/category.rb
gb_mapfish_appserver-1.0.3 app/models/category.rb
gb_mapfish_appserver-1.0.2 app/models/category.rb
gb_mapfish_appserver-1.0.1 app/models/category.rb
gb_mapfish_appserver-1.0.0 app/models/category.rb
gb_mapfish_appserver-0.9.7 app/models/category.rb
gb_mapfish_appserver-0.9.6 app/models/category.rb
gb_mapfish_appserver-0.9.5 app/models/category.rb
gb_mapfish_appserver-0.9.4 app/models/category.rb
gb_mapfish_appserver-0.9.3 app/models/category.rb
gb_mapfish_appserver-0.9.2 app/models/category.rb
gb_mapfish_appserver-0.9.1 app/models/category.rb
gb_mapfish_appserver-0.9.0 app/models/category.rb
gb_mapfish_appserver-0.8.7 app/models/category.rb
gb_mapfish_appserver-0.8.6 app/models/category.rb