Sha256: a11033b110e93a78469516f083c8d3284c3ac7b1814d650ad10ef4eecb42b8bc
Contents?: true
Size: 718 Bytes
Versions: 8
Compression:
Stored size: 718 Bytes
Contents
class Article < ActiveRecord::Base attr_accessible :body, :title, :category, :tag_ids # 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) } # 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
8 entries across 8 versions & 1 rubygems