Sha256: a91e8d0131cd3e7f8198a6767f0e9003a3673f6deab10e84af480e4f305a60ad
Contents?: true
Size: 786 Bytes
Versions: 2
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 :categories, :through => :categorizations, :class_name => 'HasFilterCategory' has_many :categorizations, :class_name => 'HasFilterCategorization', :dependent => :destroy 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
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
adva_cms-0.0.1 | vendor/gems/has_filter/test/models.rb |
adva-0.0.1 | adva_cms/vendor/gems/has_filter/test/models.rb |