Sha256: d9bbbcecffa8f12971b727588f4eb9e092f334891b9180526634dabf8770c513
Contents?: true
Size: 283 Bytes
Versions: 3
Compression:
Stored size: 283 Bytes
Contents
module WebAdmin class Video < ActiveRecord::Base include I18n::Alchemy validates :description, :link, presence: true before_save :extract_id def extract_id self.link = self.link[/v=([^&]+)/, 1] end def to_s description end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
web_admin-0.1.0 | app/models/web_admin/video.rb |
web_admin-0.0.2 | app/models/web_admin/video.rb |
web_admin-0.0.1 | app/models/web_admin/video.rb |