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-0.8.5 app/models/category.rb
gb_mapfish_appserver-0.8.4 app/models/category.rb
gb_mapfish_appserver-0.8.3 app/models/category.rb
gb_mapfish_appserver-0.8.2 app/models/category.rb
gb_mapfish_appserver-0.8.1 app/models/category.rb
gb_mapfish_appserver-0.8.0 app/models/category.rb
gb_mapfish_appserver-0.0.7 app/models/category.rb
gb_mapfish_appserver-0.0.6 app/models/category.rb
gb_mapfish_appserver-0.0.5 app/models/category.rb
gb_mapfish_appserver-0.0.4 app/models/category.rb
gb_mapfish_appserver-0.0.3 app/models/category.rb
gb_mapfish_appserver-0.0.2 app/models/category.rb
gb_mapfish_appserver-0.0.1 app/models/category.rb