Sha256: f052fca3d665e05022849b523a803e0886ab169085671f56813608a82d2683ce
Contents?: true
Size: 823 Bytes
Versions: 4
Compression:
Stored size: 823 Bytes
Contents
class Article < ActiveRecord::Base attr_accessible :body, :title, :category, :tag_ids, :images, :downloads, :poster_image # Translations translates :title, :body # Markdown markdown :body # Assets has_one_asset :poster_image, :images has_many_assets :images, :images has_many_assets :downloads, :downloads # Validations validates :title, presence: true # Markdown columns markdown :body, tables: true, link_schemes: { "youtube" => Lalala::Markdown::Handlers::YouTube.new(width: 520, height: 292), "asset" => Lalala::Markdown::Handlers::Asset.new } # Scopes scope :catA, where(:category => "A") scope :catB, where(:category => "B") scope :catC, where(:category => "C") # Bindings has_and_belongs_to_many :tags def get_tags self.tags end end
Version data entries
4 entries across 4 versions & 1 rubygems