updated readme
This commit is contained in:
14
app/models/category.rb
Normal file
14
app/models/category.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class Category < ActiveRecord::Base
|
||||
|
||||
# Associations
|
||||
has_many :forums, :dependent => :destroy
|
||||
|
||||
# Accessors
|
||||
attr_accessible :title, :state, :position, :category_id
|
||||
|
||||
# Scopes
|
||||
default_scope :order => 'position ASC'
|
||||
|
||||
# Validations
|
||||
validates :title, :presence => true
|
||||
end
|
||||
Reference in New Issue
Block a user