Sha256: d28fd221cf370162aa1c46a58a24faa72d89bdadff186ffdc0723247b241530c
Contents?: true
Size: 595 Bytes
Versions: 14
Compression:
Stored size: 595 Bytes
Contents
class Article < ActiveRecord::Base attr_accessible :body, :title, :category, :tag_ids, :url, :price has_one_asset :image # Translations translates :title, :body # 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
14 entries across 14 versions & 1 rubygems