lets try out annotations

This commit is contained in:
Sam
2013-05-24 12:35:14 +10:00
parent dd1ad508cf
commit 2cd95bc649
45 changed files with 870 additions and 1 deletions

View File

@ -1,3 +1,31 @@
# == Schema Information
#
# Table name: categories
#
# id :integer not null, primary key
# name :string(50) not null
# color :string(6) default("AB9364"), not null
# topic_id :integer
# topic_count :integer default(0), not null
# created_at :datetime not null
# updated_at :datetime not null
# user_id :integer not null
# topics_year :integer
# topics_month :integer
# topics_week :integer
# slug :string(255) not null
# description :text
# text_color :string(6) default("FFFFFF"), not null
# hotness :float default(5.0), not null
# secure :boolean default(FALSE), not null
# auto_close_days :float
#
# Indexes
#
# index_categories_on_forum_thread_count (topic_count)
# index_categories_on_name (name) UNIQUE
#
class Category < ActiveRecord::Base
belongs_to :topic, dependent: :destroy
belongs_to :topic_only_relative_url,