app/models/kinney/topic.rb in kinney-0.0.3 vs app/models/kinney/topic.rb in kinney-0.1.0
- old
+ new
@@ -1,21 +1,18 @@
module Kinney
class Topic < ActiveRecord::Base
- attr_accessible :name, :description
-
- has_many :clip_topics
- has_many :clips, :through => :clip_topics
-
- extend FriendlyId
- friendly_id :name, :use => [:slugged, :history]
-
- validates :name, :description, :presence => true
- validates_uniqueness_of :name
-
- default_scope order('name ASC')
-
- def self.with_clips
- joins(:clips).group("kinney_topics.id HAVING count(kinney_clips.id) > 0")
- end
-
+ include Kinney::Concerns::Models::Topic
end
end
+
+# == Schema Information
+#
+# Table name: kinney_topics
+#
+# id :integer not null, primary key
+# name :string(255)
+# created_at :datetime not null
+# updated_at :datetime not null
+# slug :string(255)
+# description :text
+#
+