Sha256: 9c41db1769beeab030c131acebad620b4f9ef1493d6bf58eaab0d2321bf7044f
Contents?: true
Size: 458 Bytes
Versions: 20
Compression:
Stored size: 458 Bytes
Contents
class Song < ActiveRecord::Base extend Enumerize extend FriendlyId attr_accessible :author, :mp3, :slug, :status, :title enumerize :status, in: [:published, :unpublished], default: :published, predicates: true friendly_id :title, use: :slugged mount_uploader :mp3, Songs::SongUploader validates_presence_of :title validates_presence_of :author scope :published, where(status: :published) belongs_to :related, polymorphic: true end
Version data entries
20 entries across 20 versions & 2 rubygems