Sha256: 83ba3b0895bad69d43387110a72774702684716713fd68c91d09323f2a5649c4
Contents?: true
Size: 786 Bytes
Versions: 5
Compression:
Stored size: 786 Bytes
Contents
class HasFilterArticle < ActiveRecord::Base self.table_name = 'has_filter_articles' acts_as_taggable has_filter :tagged, :categorized, :text => { :attributes => [:title, :body, :excerpt] }, :state => { :states => [:published, :unpublished] } has_many :categorizations, :class_name => 'HasFilterCategorization', :dependent => :destroy has_many :categories, :through => :categorizations, :class_name => 'HasFilterCategory' scope :published, -> { where(published: true) } scope :approved, -> { where(approved: true) } end class HasFilterCategorization < ActiveRecord::Base belongs_to :article, :class_name => 'HasFilterArticle' belongs_to :category, :class_name => 'HasFilterCategory' end class HasFilterCategory < ActiveRecord::Base end
Version data entries
5 entries across 5 versions & 1 rubygems