Sha256: 4b2d7aaef249882e87fc710d62e90750a1fedc154a6d1d57a93e5ef9b667693f
Contents?: true
Size: 425 Bytes
Versions: 9
Compression:
Stored size: 425 Bytes
Contents
class Article < ActiveRecord::Base attr_accessible :body, :title, :category, :tag_ids has_one_asset :image # Translations translates :title, :body # Validations validates :title, presence: true # 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
9 entries across 9 versions & 1 rubygems