Sha256: e64404932a21d99626a9e1aca3f809a8ef45aa476e50500eefa4d82e85d80636
Contents?: true
Size: 752 Bytes
Versions: 2
Compression:
Stored size: 752 Bytes
Contents
class TapeSubscription include Mongoid::Document include Mongoid::Timestamps include Mongoid::Search include Ants::Id ## Attributes field :title field :website_url field :website_icon_url, default: '' ## Validators validates_presence_of :title validates_presence_of :website_url ## Search search_in :title ## Relations has_many :posts, class_name: 'TapePost', dependent: :destroy embeds_many :channels, class_name: 'TapeChannel' accepts_nested_attributes_for :channels ## Helpers def _list_item_title title end # def _list_item_subtitle # website_url # end # def _list_item_thumbnail # website_icon_url # end def active_channels channels.select { |c| c.active } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tape-chr-0.1.9 | app/models/tape_subscription.rb |
tape-chr-0.1.8 | app/models/tape_subscription.rb |